解雇ModalViewController = EXC_BAD_ACCESS
我有一个模态 UIView,它也是一个委托,因此当它出现时,它会将一些变量发送回我的 DetailViewController。 我知道关闭所呈现的 ModalViewController 的正确方法是将其从我的 DetailView (呈现模式视图的视图)中关闭。 问题是,如果模态视图是表格视图,它可以正常工作,但不知怎的,这不起作用。
-(void)pickDateControllerFinished:(PickDateController *)controller{
dateSelected = [controller.datePicker date];
[self dismissModalViewControllerAnimated:YES];
NSLog(@"DateSelected %@", dateSelected);
}
所以变量实际上传递了,但视图只是不会关闭。 我使用的是带有故事板的 IOS5,没有 ARC。
我得到“EXC_BAD_ACCESS”
我也尝试使用:
[self.presentingViewController dismissModalViewControllerAnimated:YES]; // no errors but this doesn't dismiss
这里没有选项... 有什么建议吗?
I have a modal UIView that is also a delegate so when it comes out it sends some variables back to my DetailViewController.
I know the proper way to dismiss the presented ModalViewController is to dismiss it from my DetailView (the one who presents the modal view).
The problem is if the modalview is a tableview it works fine but somehow this is not working.
-(void)pickDateControllerFinished:(PickDateController *)controller{
dateSelected = [controller.datePicker date];
[self dismissModalViewControllerAnimated:YES];
NSLog(@"DateSelected %@", dateSelected);
}
So the variable actually passes but the View just won't dismiss.
I'm using IOS5 with storyboard, no ARC.
I get "EXC_BAD_ACCESS"
I also tried using:
[self.presentingViewController dismissModalViewControllerAnimated:YES]; // no errors but this doesn't dismiss
Running out of options here...
Any sugestions ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
你应该尝试
You should try