按钮在 IOS5 中不起作用
我在 ios 4.3 上构建了一个应用程序,它工作正常,但是当我在新 ios 上运行它时,后退按钮不起作用。这是我转到下一个 xib 的代码:
-(IBAction)Selection3Page:(id)sender;{ //显示下一个视图 Selection3Page * nvc = [[Selection3Page alloc] initWithNibName:nil bundle:nil]; [自我呈现ModalViewController:nvc动画:否]; [NVC 发布]; }
这是返回第一个 xib 的代码:
-(IBAction)done:(id)sender{
[self.parentViewController dismissModalViewControllerAnimated:NO];
}
请帮忙!
i built an app on ios 4.3 and it worked fine but when i run it on the new ios the back buttons dont work. Heres my code to go to the next xib:
-(IBAction)Selection3Page:(id)sender;{
//show next view
Selection3Page * nvc = [[Selection3Page alloc] initWithNibName:nil bundle:nil];
[self presentModalViewController:nvc animated:NO];
[nvc release];
}
and this is the code to return back to the first xib:
-(IBAction)done:(id)sender{
[self.parentViewController dismissModalViewControllerAnimated:NO];
}
please help!!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
iOS 5 中用于关闭模态视图的 API 发生了一些变化。请尝试以下操作:
The API for dismissing modal views was changed somewhat in iOS 5. Try this instead:
在某处发布一些
NSLog
并检查这些方法是否实际上被调用......我会从那里开始......post some
NSLog
s in there somewhere and check if the methods are actually getting called... I would start around that..