Retrieving current local time on iPhone?

后端 未结 7 675
我寻月下人不归
我寻月下人不归 2020-12-01 07:57

I\'m looking to get the current hour and minute on a user\'s iPhone for display in an app that doesn\'t show the status bar. Is there a simple way to do this?

7条回答
  •  孤城傲影
    2020-12-01 08:10

    See this similar question for an answer. You will have to change it to your date format.

    [[NSDate date] timeIntervalSince1970];

提交回复
热议问题