Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想在 iOS 中的一个方法中编写一些代码,并且应该每 1 秒调用一次该方法。谁能帮我做到这一点。提前致谢。
[NSTimer scheduledTimerWithTimeInterval:1.0 target:self selector:@selector(thisIsCalledEvery1Second:) userInfo:nil repeats:YES];
阅读NSTimer的 Apple 文档