我有这个代码:
-(void)applicationDidBecomeActive:(UIApplication *)application {
JUnlockController *passcodeView = [[JUnlockController alloc] init];
[self.navigationController presentModalViewController:passcodeView animated:YES];
}
问题是,当我在我的应用程序中打开模态视图 Controller 时,它不会出现在其顶部。我希望能够找出用户正在查看的当前 View Controller ,以便我可以将其显示在顶部。
最佳答案
而不是:
[self.navigationController presentModalViewController:passcodeView animated:YES];
用途:
[self presentModalViewController:passcodeView animated:YES];
关于iphone - 如何将模态视图添加到当前 View Controller 上?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11505728/