UIPageControl 分页

只要将 UIScrollView 的 pageEnabled 属性设置为 YES,UIScrollView 会被分割成多个独立页面,里面的内容就能进行分页展示

一般会配合 UIPageControl 增强分页效果, UIPageControl 常用属性如下

一共有多少页

@property (nonatomic) NSInteger numberOfPage;

显示当前页码

@property(nonatomic) BOOL currentPage;

只有一页时,是否需要隐藏页码指示器

@property(nonatomic)BOOL hidesForSinglePage;

其他页码指示器的颜色

@property(nonatomic,retain) UIColor *pageIndicatorTintColor;

当前页码指示器的颜色

@property(nonatomic,retain) UIColor *currentPageIndicatorTintColor;

你可能感兴趣的:(UIPageControl 分页)