1. 首页
  2. 考试认证
  3. 其它
  4. TSModalViewController自定义模态视图控制器隐藏逻辑

TSModalViewController自定义模态视图控制器隐藏逻辑

上传者: 2024-11-04 09:42:41上传 ZIP文件 105.54KB 热度 3次

TSModalViewController自定义模态视图控制器,在呈现的视图之外点击时隐藏(在FormSheet中呈现)。\

\

用法:\

// 让你的 ViewController 继承自 TSModalViewController\

#import \"TSModalViewController.h\"\

@interface ToShowModalViewController : TSModalViewController @end\

\

  • (IBAction)didClickedGoButton:(id)sender {\

    ToShowModalViewController *viewController = [[ToShowModalViewController alloc] init];\

    viewController.modalPresentationStyle = UIModalPresentationFormSheet;\

    [self presentViewController:viewController animated:YES completion:nil];\

}

用户评论