![](/img/trans.png)
[英]How could I present a viewController while still see the background viewController
[英]How to present viewController while I can still see the background viewController
例如,当我显示UIActivityViewController或UIAlertController时,仍然可以看到背景viewController,并且我不想在viewContollerA中嵌入viewControllerB。
[self presentViewController:viewControllerHere animated:YES completion:nil];
您可以为UIAlertController这样实现
UIAlertController *alertController = [UIAlertController alertControllerWithTitle:@"Title" message:@"Message" preferredStyle:UIAlertControllerStyleAlert];
UIAlertAction *cancelAction = [UIAlertAction actionWithTitle:@"Cancel " style:UIAlertActionStyleCancel handler:^(UIAlertAction * action) {
NSLog(@"cancel");
}];
[alertController addAction:cancelAction];
[self presentViewController: alertController animated:YES completion:nil];
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.