配置多种翻页效果
///翻页效果枚举
typedef NS_ENUM(NSInteger, LABPageEffectType) {
LABPageEffectTypeNone, //无效果
LABPageEffectTypeCoverPage, //覆盖
LABPageEffectTypeLeftRightPage, //左右分页
LABPageEffectTypeLeftRightScroll, //左右滑动
LABPageEffectTypeSimulation, //仿真
LABPageEffectTypeUpdownPage, //上下分页
LABPageEffectTypeUpdownScroll //上下滑动
};
配置设置参数
///dataSource/delegate
@property (nonatomic, weak) id<LABCoverControllerDataSource> dataSource;
@property (nonatomic, weak) id<LABCoverControllerDelegate> delegate;
///页面切换代理
@property (nonatomic, strong) id<LABCoverTranslationDelegate> translationDelegate;
///切换方向,默认LABCoverDirectionHorizontal
@property (nonatomic, assign) LABCoverDirection direction;
///当前控制器
@property(nonatomic, strong, readonly) UIViewController *curController;
///是否可以点击切换,默认YES
@property (nonatomic, assign) BOOL tapSwitchEnable;
///是否可以滑动切换,默认YES
@property (nonatomic, assign) BOOL panSwitchEnable;
///切换时是否动画,默认YES
@property (nonatomic, assign) BOOL switchAnimationEnable;
///是否正在动画中
@property(nonatomic, assign, readonly, getter=isAnimating) BOOL animating;
获取将要展示页面
///获取上一页的VC
///@param coverController coverController
///@param viewController 当前VC
///@return 上一页的VC
- (nullable UIViewController *)labCoverController:(LABCoverController *)coverController viewControllerBeforeViewController:(UIViewController *)viewController;
///获取下一页的VC
///@param coverController coverController
///@param viewController 当前VC
///@return 下一页的VC
- (nullable UIViewController *)labCoverController:(LABCoverController *)coverController viewControllerAfterViewController:(UIViewController *)viewController;