开发者

iPhone: Maintain Timer value between different views

I have built iPhone game application which has loads of views. The next view gets decided based on the user's current action. It working fine absolutely开发者_StackOverflow社区. I want to start a timer when my game gets started and want to keep incrementing till game finished. Nothing fency! The problem is I can put label on view and use NS Timer ticks to increment its value but how to synchronize that value when move to next view?

Could anyone please let me know if there is already framwork available that support this or any way to implement this.

Thanks.


The easiest solution would be to have the timer be a property in your app delegate, so you can access it from any view/view controller. That's what I'd do here. It doesn't seem to "belong" to individual views based on what you've described.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜