【发布时间】:2011-03-24 08:46:19
【问题描述】:
我创建了一个基于拆分视图的应用程序,并且在 appDelegate applicationdidFinishLaunchingWithOptions 方法中我显示了一个弹出窗口
(BOOL)application:(UIApplication *)applicationdidFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
[self.window addSubview:splitViewController.view];
[self.window makeKeyAndVisible];
ModalScreenPopup *modalpopup = [[ModalScreenPopup alloc] init];
[modalpopup setModalTransitionStyle:UIModalTransitionStyleCoverVertical];
[modalpopup setModalPresentationStyle:UIModalPresentationFullScreen];
[splitViewController presentModalViewController:modalpopup animated:NO];
[modalpopup release];
return YES;
}
(void) OpenTradeShowListingPopup
{
[splitViewController dismissModalViewControllerAnimated:YES];
TradeShowListing *modalTradeShowListing = [[TradeShowListing alloc] init];
[modalTradeShowListing setModalTransitionStyle:UIModalTransitionStyleCoverVertical];
[modalTradeShowListing setModalPresentationStyle:UIModalPresentationFullScreen];
[splitViewController presentModalViewController:modalTradeShowListing animated:YES];
[modalTradeShowListing release];
}
ModalScreenPopup 有 2 个按钮,名称为 Synchronize 并在我单击同步按钮时继续使用 app 我正在调用在 appDelegate 中声明的 OpenTradeShowListingPopup 方法。该方法调用了另一个弹出窗口,但现在第一个模式被关闭,但第二个弹出窗口没有被调用。
我已经通过使用 UINavigationController 解决了我的问题,这篇文章真的对我有很大帮助一个名叫 JNOXX 的人在 Mac 论坛上帮助了我这里是 the link。
感谢 7KV7 帮助我。
【问题讨论】:
标签: iphone objective-c