// // MTPageView.h // MTPage // // Created by ko1o on 2019/5/6. // Copyright © 2019年 ko1o. All rights reserved. // #import #import "MTPageConfig.h" NS_ASSUME_NONNULL_BEGIN @interface MTPageView : UIView + (instancetype)pageViewWithItemModels:(NSArray *)itemModels setupConfig:(void(^)(MTPageConfig *config))setupConfigBlock itemDidSelect:(void(^)(id itemModel, NSInteger index))itemDidSelectBlock; @property (nonatomic, strong) UIScrollView *menuContentScrollView; @property (nonatomic, strong) UIScrollView *pageContentScrollView; - (MTPageConfig *)pageConfig; - (void)startLoading; - (void)endLoadingWithItemModels:(NSArray *)itemModels; - (BOOL)isLoading; - (void)viewWillAppear:(BOOL)animated; /// 所有标签的view controler 的 parent view controller - (UIViewController *)pageViewController; - (UIViewController *)currentPageViewController; /// 选中指定下标(是否执行动画根据config的switchAnimated属性) - (void)selectItemAtIndex:(NSInteger)index; - (void)selectItemAtIndex:(NSInteger)index animated:(BOOL)animated; /// 对换下标 - (void)exchangeItemAtIndex:(NSInteger)index1 withItemAtIndex:(NSInteger)index2; /// 移除下标 - (void)removeItemAtIndex:(NSInteger)index; /// 添加 - (void)addItemWithModel:(id)itemModel; @end NS_ASSUME_NONNULL_END