首页 > 其他 > 详细

第十一篇 - UIPageControl

时间:2016-03-18 15:58:11      阅读:149      评论:0      收藏:0      [点我收藏+]

初始化

UIPageControl *page = [[UIPageControl alloc] init];

你需要给她设置 numberOfPages 属性 不为0。不然,看不见

 

//NS_ASSUME_NONNULL_BEGIN
//
//NS_CLASS_AVAILABLE_IOS(2_0) @interface UIPageControl : UIControl
//
//@property(nonatomic) NSInteger numberOfPages;          // default is 0
//@property(nonatomic) NSInteger currentPage;            // default is 0. value pinned to 0..numberOfPages-1
//
//设置为yes时,且numberOfPages=1时,空间时不显示的。可能没有被创建
//@property(nonatomic) BOOL hidesForSinglePage;          // hide the the indicator if there is only one page. default is NO
//
//如果设置为yes,那么,当你点击小圆点时,不会立即切换。必须调用updateCurrentPageDisplay
//@property(nonatomic) BOOL defersCurrentPageDisplay;    // if set, clicking to a new page won‘t update the currently displayed page until -updateCurrentPageDisplay is called. default is NO
//- (void)updateCurrentPageDisplay;                      // update page display to match the currentPage. ignored if defersCurrentPageDisplay is NO. setting the page value directly will update immediately
//
//- (CGSize)sizeForNumberOfPages:(NSInteger)pageCount;   // returns minimum size required to display dots for given page count. can be used to size control if page count could change
//
//没有选中的颜色
//@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

  

第十一篇 - UIPageControl

原文:http://www.cnblogs.com/kinghx/p/5292411.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!