从苹果文档:
总结Once scheduled on a run loop,the timer fires at the specifIEd interval until it is invalIDated. A non-repeating timer invalIDates itself immediately after it fires. However,for a repeating timer,you must invalIDate the timer object yourself by calling its invalIDate method. Calling this method requests the removal of the timer from the current run loop; as a result,you should always call the invalIDate method from the same thread on which the timer was installed. InvalIDating the timer immediately disables it so that it no longer affects the run loop. The run loop then removes and releases the timer,either just before the invalIDate method returns or at some later point. Once invalIDated,timer objects cannot be reused.
以上是内存溢出为你收集整理的objective-c – 如何在使NSTimer失效后“验证”?全部内容,希望文章能够帮你解决objective-c – 如何在使NSTimer失效后“验证”?所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)