您将无法像弹出UIViewController那样打开.
为此,你将不得不使用一个简单的UIView
将UIview(弹出形状)添加到当前视图.
- (void) initPopUpView {
popup.alpha = 0;
popup.frame = CGRectMake (160, 240, 0, 0);
[self.view addSubview:popup];
}
- (void) animatePopUpShow {
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:0.3];
[UIView setAnimationDelegate:self];
[UIView setAnimationWillStartSelector:@selector(initPopUpView)];
popup.alpha = 1;
popup.frame = CGRectMake (20, 40, 300, 400);
[UIView commitAnimations];
}
Run Code Online (Sandbox Code Playgroud)