XFCoverTransition Modal 界面切换 项目简介
XFCoverTransition 内置各种自定义 Modal 界面切换效果,提供手势移除的功能,使用单例对 XFCoverTransitionTouch 对象的管理,多处的多种界面切换效果无需初始化多个对象,使用上方便,具有可配置性强,并支持在不使用系统的 Modal 方式外使用 XFCoverTransitionGesture 类以实现全手势模拟 Modal 的切换效果。自定义 modal:// 自定义modal
XFPageViewController *page = [[XFPageViewController alloc] init];
page.modalPresentationStyle = UIModalPresentationCustom;
XFCoverTransitionTouch *ctTouch = [XFCoverTransitionTouch sharedInstance];
ctTouch.config = [XFCTConfig configWithRenderRect:self.view.bounds animationDuration:0.25 transitionStyle:XFCoverTransitionStyleRight2Left];
// 添加移除手势支持
ctTouch.config.onlyForModalVCGestureDissmiss = YES;
page.transitioningDelegate = ctTouch;
[self presentViewController:page animated:YES completion:nil];
XFPageViewController *page = [[XFPageViewController alloc] init];
page.modalPresentationStyle = UIModalPresentationCustom;
XFCoverTransitionTouch *ctTouch = [XFCoverTransitionTouch sharedInstance];
ctTouch.config = [XFCTConfig configWithRenderRect:self.view.bounds animationDuration:0.25 transitionStyle:XFCoverTransitionStyleRight2Left];
// 添加移除手势支持
ctTouch.config.onlyForModalVCGestureDissmiss = YES;
page.transitioningDelegate = ctTouch;
[self presentViewController:page animated:YES completion:nil];