UINavigationController 的问题
我正在创建一个游戏,在其中我需要提供这种功能,能够从任何级别进入第一个屏幕,并从第一个屏幕进入任何级别(在恢复的情况下),为此我使用导航控制器。 我面临的问题是我不希望这种推送看起来是动画的,所以我写了
[self.navigationController PushViewController:level1_completeanimate:NO];
它对于提升我的第一级效果很好。但是在该级别结束后,应用程序崩溃,因为没有其他 viewController 被推送,如果我将这个动画属性设置为“YES”,那么一切都可以正常工作,但它当然会以动画方式显示...我不希望它看起来动画并且让它运行。
有人可以帮忙吗?提前致谢。
I'm creating an game in which I need to provide this facility of being able to come to the first screen from any level, and go to any level from first screen(in case of RESUME), for which I'm using a navigation controller.
The problem I'm facing is I dont want this pushing to look animated so I wrote
[self.navigationController pushViewController:level1_complete animated:NO];
It works fine for pushing my first level. But after that level is over, the application crashes as no other viewController gets pushed, and if I make this animated property to be "YES", then evrything works fine but it appears animatedly ofcourse... I dont want it to look animated and make it run.
Can anybody please help? Thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您是否从 level1_complete 推送另一个视图控制器?
如果是,那么也将其设置为动画:不,
我认为问题会得到解决......
are you pushing another view controller from level1_complete ?
if yes then make it also as animated:NO
i think problem will be resolved...
关卡完成后,您正在使用导航控制器做什么?
您应该能够执行以下操作:
What are you doing with the navigation controller when the level is completed?
You should be able to do something like: