Objective c 如何在iOS 5中消除弹出窗口?
我在iPad的主控端有一个PatientTableViewController,它有一个按钮用于添加新患者。它通过popover segue转换到这个新的PatientViewController 在新建PatientViewController中,我有一个“完成”按钮,该按钮将委托回PatientTableViewController:Objective c 如何在iOS 5中消除弹出窗口?,objective-c,xcode,cocoa-touch,ipad,xcode4.2,Objective C,Xcode,Cocoa Touch,Ipad,Xcode4.2,我在iPad的主控端有一个PatientTableViewController,它有一个按钮用于添加新患者。它通过popover segue转换到这个新的PatientViewController 在新建PatientViewController中,我有一个“完成”按钮,该按钮将委托回PatientTableViewController: - (void)newPatientViewController:(NewPatientViewController *)sender withZipCode
- (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];
}
我尝试过的所有方法都不管用。然而,如果我使用模态segue,一切正常。Wat?您是否尝试过在UIPopoverController类上解除PopOveranimated:?在 基本上,您需要有一个变量来跟踪segue(您需要将它转换为一个uistoryboardpoposerversegue)和一些更奇怪的东西
我写了一封信,更详细地描述了解决方案。谢谢你,伙计。我试过了,但不知道该在哪一个属性上调用它。我终于偶然发现了帮助我解决这个问题的方法。我还没有使用故事板,所以我只是在黑暗中拍摄。