what is the iOS sleep function

◇◆丶佛笑我妖孽 提交于 2019-12-06 16:38:14

问题


I am looking for a function that puts a thread to sleep on iOS for c++ code, or even objective-c code, sleep(0) is not recognized by my compiler

Thanks,


回答1:


Block for .5 seconds:

[NSThread sleepForTimeInterval:.5];


来源:https://stackoverflow.com/questions/15004712/what-is-the-ios-sleep-function

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!