只要將 UIScrollView 的 pageEnabled 屬性設(shè)置為 YES,UIScrollView 會(huì)被分割成多個(gè)獨(dú)立頁面,里面的內(nèi)容就能進(jìn)行分頁展示
一般會(huì)配合 UIPageControl 增強(qiáng)分頁效果, UIPageControl 常用屬性如下
一共有多少頁
@property (nonatomic) NSInteger numberOfPage;
顯示當(dāng)前頁碼
@property(nonatomic) BOOL currentPage;
只有一頁時(shí),是否需要隱藏頁碼指示器
@property(nonatomic)BOOL hidesForSinglePage;
其他頁碼指示器的顏色
@property(nonatomic,retain) UIColor *pageIndicatorTintColor;
當(dāng)前頁碼指示器的顏色
@property(nonatomic,retain) UIColor *currentPageIndicatorTintColor;