UIPageControl 分頁

只要將 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;

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡書系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

推薦閱讀更多精彩內(nèi)容