iOS UIPageControl
来源:互联网 发布:网络暴力调查问卷 编辑:程序博客网 时间:2024/05/18 01:14
UIPageControl与UILabel相似,用于指示当前第几页(代码),通常与UIScrollView配合使用
1.currrntPage 当前页面
2.numberOfPage 指定页面个数
UIPageControl从类名可以看出,其父类是UIControl,所以可以像button一样添加事件,都是用UIControlEventsTouchUpinside或者是UIControlEventsValueChanged
//分页
@property(nonatomic,retain)UIPageControl *page;
//UIPageControl
self.page = [[UIPageControl alloc] initWithFrame:CGRectMake(50, 100, 200, 50)];
self.page.backgroundColor = [UIColor grayColor];
//设置页数
self.page.numberOfPages = 5;
[self addSubview:self.page];
//UIPageControl 控制器里写
在.h中,设置属性
添加分页事件
[self.myview.page addTarget:self action:@selector(pageAction:) forControlEvents:UIControlEventTouchUpInside];
-(void)pageaction:(uipagecontrol*)sender
{
nslog(@"第%d页",sender.currentpage);
}
- ios--UIPageControl
- iOS UIPageControl
- ios:详解UIPageControl
- iOS UIPageControl使用
- iOS UIPageControl使用
- iOS UIPageControl简单实例
- IOS初级:UIScrollView & UIPageControl
- iOS开发 -- UIpageControl
- iOS开发 ----- UIScrollview UIPageControl
- iOS编程-------UIScrollView / UIPageControl
- iOS UIPageControl使用
- iOS UIPageControl 常用属性
- iOS开发基础-UIPageControl
- iOS 自定义UIpageControl
- iOS UIPageControl设置图片
- iOS控件之UIPageControl
- IOS 之 UIScrollView,UIPageControl
- IOS分页控制器 - UIPageControl
- 织梦DedeCMS增加自定义文档属性四部曲
- jQuery中join方法
- android 根据原理分析ListView滑动checkbox状态被清除 不保存
- nodejs扩展log4js正则匹配区分文件(方案一)
- 指针和引用
- iOS UIPageControl
- cocostudio 2.0版本爬坑手记
- 第10周项目1(3)getchar()接受字符数据规律
- 数据结构实验之二叉树的建立于遍历
- 显示半个模态视图的方法
- Linux下安装docker
- 2014年10月份浏览器份IE11晋升第一Web浏览器
- 第十周项目6-贪财的富翁
- Pinterest Copy to China——meterial collect