// // NTESPageView.h // NIM // // Created by chris on 15/12/16. // Copyright © 2015年 Netease. All rights reserved. // #import @class NTESPageView; @protocol NTESPageViewDataSource - (NSInteger)numberOfPages: (NTESPageView *)pageView; - (UIView *)pageView: (NTESPageView *)pageView viewInPage: (NSInteger)index; @end @protocol NTESPageViewDelegate @optional - (void)pageViewScrollEnd: (NTESPageView *)pageView currentIndex: (NSInteger)index totolPages: (NSInteger)pages; - (void)pageViewDidScroll: (NTESPageView *)pageView; - (BOOL)needScrollAnimation; @end @interface NTESPageView : UIView @property (nonatomic,strong) UIScrollView *scrollView; @property (nonatomic,weak) id dataSource; @property (nonatomic,weak) id pageViewDelegate; - (void)scrollToPage: (NSInteger)pages; - (void)reloadData; - (UIView *)viewAtIndex: (NSInteger)index; - (NSInteger)currentPage; //旋转相关方法,这两个方法必须配对调用,否则会有问题 - (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration; - (void)willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration; @end