// // NIMPageView.h // NIMKit // // Created by chris. // Copyright (c) 2015年 NetEase. All rights reserved. // #import @class NIMPageView; @protocol NIMPageViewDataSource - (NSInteger)numberOfPages: (NIMPageView *)pageView; - (UIView *)pageView: (NIMPageView *)pageView viewInPage: (NSInteger)index; @end @protocol NIMPageViewDelegate @optional - (void)pageViewScrollEnd: (NIMPageView *)pageView currentIndex: (NSInteger)index totolPages: (NSInteger)pages; - (void)pageViewDidScroll: (NIMPageView *)pageView; - (BOOL)needScrollAnimation; @end @interface NIMPageView : 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