4
我剛剛創建了測試應用程序,並希望從其他應用程序中進行午餐。使用url方案打開其他應用程序
在這兩個應用程序中添加了Url類型和方案。然後從一個應用程序稱爲:
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"Test://test_page/"]];
這個工作,但我得到了一個警告:
應用程序窗口預計將有在應用程序啓動的最後一個根視圖控制器
什麼我在這裏失蹤?
感謝
編輯:添加測試應用程序的午餐方法:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
MyViewController *mainView = [[MyViewController alloc] init];
UINavigationController *navControl = [[UINavigationController alloc] initWithRootViewController: mainView];
[self.window setRootViewController: navControl];
// Override point for customization after application launch.
self.window.backgroundColor = [UIColor whiteColor];
[self.window makeKeyAndVisible];
return YES;
}
https://www.google.com/#hl=zh-CN&tbo=d&output=search&sclient=psy-ab&q=Application+windows+are+expected+to+have+a+root+view+controller + AT + +應用+發射++&OQ =應用+窗口的+端+ +爲+預期+至+有+ A +根+視圖+控制器+ AT + +應用+發射++ gs_l的+端+ = hp.3..0i30j0i8i5.152.152.0.483.1.1.0.0.0.0.78.78.1.1.0.les%3Bcdymh..0.0 ... 1.2.xo3sepwI3nI&PBX = 1&BAV = on.2,or.r_gc.r_pw.r_cp .r_qf。&fp = c5f121a6de0d0409&bpcl = 38625945&biw = 1395&bih = 783,http://stackoverflow.com/questions/7520971/applications-are-expected-to-have-a-root-view-controller-at-the-end-of -applicati, – iDev
http://stackoverflow.com/questions/8706828/application-windows-are-expected-to-have-a-root-view-controller-at-the-end-of-a – NSAddict