Retrieving current local time on iPhone?

后端 未结 7 664
我寻月下人不归
我寻月下人不归 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:23

    if you are looking to calculate time intervals, you are better off using CACurrentMediaTime

    double currentTime = CACurrentMediaTime();
    

提交回复
热议问题