UIPageControl
2016-01-02 20:28
417 查看
UIPageControl用于显示滑动视图实际拥有的页数
UIPageControl *page = [[UIPageControl alloc] initWithFrame:CGRectMake(100, 100, 100, 30);
page.background = [UIColor redColor];
page.numberOfPages = 5; //设置拥有的页数
page.currentPage = 2; //设置当前显示第几个点
page.pageIndicatorTintColor = [UIColor redColor]; //设置当前选中的点的颜色.
[page addTarget:self action:@selector(handlePageControl:) forControlEvent:UIControlEventValueChanged]; //添加点击事件
UIPageControl *page = [[UIPageControl alloc] initWithFrame:CGRectMake(100, 100, 100, 30);
page.background = [UIColor redColor];
page.numberOfPages = 5; //设置拥有的页数
page.currentPage = 2; //设置当前显示第几个点
page.pageIndicatorTintColor = [UIColor redColor]; //设置当前选中的点的颜色.
[page addTarget:self action:@selector(handlePageControl:) forControlEvent:UIControlEventValueChanged]; //添加点击事件
相关文章推荐
- UIScrollView
- UIView动画
- 182. Duplicate Emails My Submissions Question
- iOS UIPickerView的使用
- UISlider 滑竿控件
- 303,Range Sum Query
- UISegmentControl
- UIButton, UILabel, UITextField
- UISwitch 开关控件
- UEFI不小心误删EPS分区里的grub引导恢复
- 加载EasyUi和使用Parser解析器
- UIView属性
- POJ-3061 Subsequence(尺取法)
- 二分+线段树 Codeforces609F Frogs and mosquitoes
- Java基础之break和continue
- UITableView 滚动流程性优化
- ArrayBlockingQueue 和LinkedBlockingQueue
- BlockingQueue
- LeetCode 95:Unique Binary Search Trees II
- Android UI标题栏模板设计