使用模态视图

下面两个是模态视图两个动画的参数,设置的时候可以写成
self.modalPresentationStyle = 1;
[self presentModalViewController:navSetWireless animated:YES];
//modalTransitionStyle跟modalPresentationStyle相互对应



modalTransitionStyle

      UIModalTransitionStyleCoverVertical

      UIModalTransitionStyleFlipHorizontal

      UIModalTransitionStyleCrossDissolve

      UIModalTransitionStylePartialCurl

modalPresentationStyle

      UIModalPresentationFullScreen

      UIModalPresentationPageSheet

      UIModalPresentationFormSheet

      UIModalPresentationCurrentContext


当一个页面打开一个模态视图后,操作完成时,需要返回之前页面可以用
if ([self respondsToSelector:@selector(presentingViewController)])
 {
      [self.presentingViewController.presentingViewController dismissModalViewControllerAnimated:YES];
 }
else
 {
      [self.parentViewController.parentViewController dismissModalViewControllerAnimated:YES];
}

猜你喜欢

转载自zcw-java.iteye.com/blog/1882739