美文网首页iOS UIKit框架学习
iOS-UIKit框架学习—UIPageControl

iOS-UIKit框架学习—UIPageControl

作者: Wynter_Wang | 来源:发表于2017-03-08 16:29 被阅读16次

您可以使用UIPageControl类来创建和管理页面控制。一个页面控制是在控制中心的点继承。每个点对应一个应用程序的文档(或其他实体的数据模型)页面,白色圆点表示当前浏览的网页。

NS_CLASS_AVAILABLE_IOS(2_0) @interface UIPageControl : UIControl

// 页面总数 默认值0
@property(nonatomic) NSInteger numberOfPages;
// 当前第几页 默认值0
@property(nonatomic) NSInteger currentPage;
// 如果只有一页是否隐藏指示器 默认值NO
@property(nonatomic) BOOL hidesForSinglePage;
// 点击到新的一页不会更新当前的值,直到调用 -updateCurrentPageDisplay ,默认值NO
@property(nonatomic) BOOL defersCurrentPageDisplay;
// 更新当前控件显示的值
- (void)updateCurrentPageDisplay;
// 返回显示为点所需的最小大小给出页计数
- (CGSize)sizeForNumberOfPages:(NSInteger)pageCount;

// 底层指示器颜色
@property(nullable, nonatomic,strong) UIColor *pageIndicatorTintColor NS_AVAILABLE_IOS(6_0) UI_APPEARANCE_SELECTOR;
// 当前指示器颜色
@property(nullable, nonatomic,strong) UIColor *currentPageIndicatorTintColor NS_AVAILABLE_IOS(6_0) UI_APPEARANCE_SELECTOR;

@end

相关文章

网友评论

    本文标题:iOS-UIKit框架学习—UIPageControl

    本文链接:https://www.haomeiwen.com/subject/zugbgttx.html