加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

objective-c – 如何解决iOS 5中的popovers?

发布时间:2020-12-14 18:05:40 所属栏目:百科 来源:网络整理
导读:我在iPad的主控侧有一个PatientTableViewController,它有一个用于添加新病人的按钮.它通过popover segue转换到这个NewPatientViewController. 在NewPatientViewController中,我有一个Done按钮,该按钮委托给PatientTableViewController: - (void)newPatientV
我在iPad的主控侧有一个PatientTableViewController,它有一个用于添加新病人的按钮.它通过popover segue转换到这个NewPatientViewController.

在NewPatientViewController中,我有一个Done按钮,该按钮委托给PatientTableViewController:

- (void)newPatientViewController:(NewPatientViewController *)sender withZipCode:(NSNumber *)zipCode andFirstName:(NSString *)firstName andLastName:(NSString *)lastName
{
    [self dismissViewControllerAnimated:YES completion:NULL];
    [self dismissModalViewControllerAnimated:YES];
    [sender dismissModalViewControllerAnimated:YES];
    [sender dismissViewControllerAnimated:YES completion:NULL];
}

我上面尝试过的方法都没有.但是,如果我使用Modal segue,一切正常.笏?

解决方法

最后在 this post的帮助下弄明白了

基本上,你需要有一个变量跟踪segue(你需要将其转换为UIStoryboardPopoverSegue)并且更加奇怪.

我写了一个blog post更详细地描述了解决方案.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读