例如,当我呈现UIActivityViewController或UIAlertController时,我仍然可以看到后台viewController,我不想在viewContollerA中嵌入viewControllerB。
答案 0 :(得分:1)
[self presentViewController:viewControllerHere animated:YES completion:nil];
答案 1 :(得分:0)
你可以为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];