Tag: 模态控制器目前的模态控制器

iOS:具有透明背景的Modal ViewController

我试图以透明的背景模态地呈现视图控制器。 我的目标是让呈现和呈现的视图控制器的视图同时显示。 问题是,当呈现animation完成时,呈现视图控制器的视图消失。 – (IBAction)pushModalViewControllerButtonPressed:(id)sender { ModalViewController *modalVC = [[ModalViewController alloc] init]; [self presentViewController:modalVC animated:YES completion:nil]; } 我知道我可以添加视图作为子视图,但我想避免这个解决scheme出于某种原因。 我怎么解决它?