UI 常用方法总结之--- UIPageControl (不断更新中)
2014-10-13 08:27
399 查看
UIPageControl :
UIControl
1.创建一个UIPageControl对象
UIPageControl *pageControl = [[UIPageControl
alloc]initWithFrame:CGRectMake(20,
20, 280, 50)];
2.backgroundColor
背景颜色
3.numberOfPages
显示的页数控制()
eg:pageControl.numberOfPages =
10;
4.currentPageIndicatorTintColor
当前点的颜色
eg:pageControl.currentPageIndicatorTintColor = [UIColor
yellowColor];
5.pageIndicatorTintColor
未被选中点的颜色
eg:pageControl.pageIndicatorTintColor = [UIColor
greenColor];
6.- (void)addTarget:(id)target action:(SEL)action forControlEvents:(UIControlEvents)controlEvents;
使用UIControlEventValueChanged
7.常用绑定方法
CGFloat xoffset = pageControl.currentPage *280;
CGPoint offset =
CGPointMake(xoffset, 0);
[self.scrollView
setContentOffset:offset animated:YES];
self.scrollView.contentOffset = offset;
//计算scrollView的偏移量
UIControl
1.创建一个UIPageControl对象
UIPageControl *pageControl = [[UIPageControl
alloc]initWithFrame:CGRectMake(20,
20, 280, 50)];
2.backgroundColor
背景颜色
3.numberOfPages
显示的页数控制()
eg:pageControl.numberOfPages =
10;
4.currentPageIndicatorTintColor
当前点的颜色
eg:pageControl.currentPageIndicatorTintColor = [UIColor
yellowColor];
5.pageIndicatorTintColor
未被选中点的颜色
eg:pageControl.pageIndicatorTintColor = [UIColor
greenColor];
6.- (void)addTarget:(id)target action:(SEL)action forControlEvents:(UIControlEvents)controlEvents;
使用UIControlEventValueChanged
7.常用绑定方法
CGFloat xoffset = pageControl.currentPage *280;
CGPoint offset =
CGPointMake(xoffset, 0);
[self.scrollView
setContentOffset:offset animated:YES];
self.scrollView.contentOffset = offset;
//计算scrollView的偏移量
相关文章推荐
- UI 常用方法总结之--- UINavigationController (不断更新中)
- UI 常用方法总结之--- UIButton UIAlertView (不断更新中)
- UI 常用方法总结之--- UIWindow UIView (不断更新中)
- UI 常用方法总结之--- UITableView (不断更新中)
- UI 常用方法总结之--- UIViewController UIResponder (不断更新中)
- UI 常用方法总结之---各个手势种类 (不断更新中)
- UI 常用方法总结之--- UIScrollView (不断更新中)
- UI 常用方法总结之--- UIImageView UISlider UISegmentedControl (不断更新中)
- UI 常用方法总结之--- UILabel UITextField (不断更新中)
- 【转载】C# Winform 跨线程更新UI控件常用方法总结
- C# Winform 跨线程更新UI控件常用方法总结(转)
- C# Winform 跨线程更新UI控件常用方法总结
- Eclipse 插件开发中常用方法总结(不断更新...)
- C# Winform 跨线程更新UI控件常用方法总结(转)
- C# Winform 跨线程更新UI控件常用方法总结(转)
- ios开发总结:Utils常用方法等收集,添加扩展类,工具类方法,拥有很多方便快捷功能(不断更新中。。。)
- C# Winform 跨线程更新UI控件常用方法总结(转)
- C# Winform 跨线程更新UI控件常用方法总结(转)
- C# Winform 跨线程更新UI控件常用方法总结(转)
- VIM一些设置及常用shell命令总结(不断更新...)