码迷,mamicode.com
首页 > 其他好文 > 详细

UIPageControl小圆点设置图片

时间:2015-06-10 13:47:30      阅读:112      评论:0      收藏:0      [点我收藏+]

标签:

NS_CLASS_AVAILABLE_IOS(2_0) @interface UIPageControl : UIControl {

  @private

    NSMutableArray* _indicators;

    NSInteger       _currentPage;

    NSInteger       _displayedPage;

    struct {

        unsigned int hideForSinglePage:1;

        unsigned int defersCurrentPageDisplay:1;

    } _pageControlFlags;

    UIImage*        _currentPageImage;

    UIImage*        _pageImage;

}

- (UIPageControl *)pageControl{

    if (_pageControl == nil) {

        _pageControl = [[UIPageControl alloc]init];

        _pageControl.backgroundColor = [UIColor whiteColor];

        [_pageControl setValue:[UIImage imageNamed:@"compose_keyboard_dot_normal@2x"] forKey:@"_pageImage"];

        [_pageControl setValue:[UIImage imageNamed:@"compose_keyboard_dot_selected@2x"] forKey:@"_currentPageImage"];

       [self addSubview:_pageControl];

    }

    return _pageControl;

}

 

UIPageControl小圆点设置图片

标签:

原文地址:http://www.cnblogs.com/yintingting/p/4565667.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!