使用模態跳轉,Xcode有時候會出現code
Presenting view controllers on detached view controllers is discouraged <SetViewController: 0x7fedb94f0f60>.
這樣的警告代碼,若是你認爲你的層次之間沒有問題(其實就是層次問題。present出來的模態窗口,禁止再使用present 來彈出其它的子窗口)it
解決方法:io
把class
WithUsViewController *with=[[WithUsViewController alloc]init]; [self presentViewController:with animated:YES completion:nil];
改成:方法
AppDelegate *delegate = (AppDelegate *)[UIApplication sharedApplication].delegate; WithUsViewController *with=[[WithUsViewController alloc]init]; [delegate.window.rootViewController presentViewController:with animated:YES completion:^{ }];
便可
im