我有一个来自另一个带有 XIB 文件的视图控制器的弹出视图。它从父 VC ( detailViewController
) 启动,但关闭代码在其自己的 VC ( KNThirdViewController
)中
当从 ( KNThirdViewController
)调用它时
- (IBAction)dismissButtonDidTouch:(id)sender {
[self dismissModalViewControllerAnimated:NO];
}
应用程序返回到rootViewController
而不是detailViewController
. 它应该简单地关闭自己(KNThirdViewController
弹出式 VC)并将用户返回到detailViewController
.
视图控制器显示:
-(void)scriviBtnPress {
// You can also present a UIViewController with complex views in it
// and optionally containing an explicit dismiss button for semi modal
[self presentSemiViewController:semiVC withOptions:@{
KNSemiModalOptionKeys.pushParentBack : @(YES),
KNSemiModalOptionKeys.animationDuration : @(0.5),
KNSemiModalOptionKeys.shadowOpacity : @(0.3),
}];
}