图像及动画处理六:选取器(dataPicker仿苹果)
2011-11-10 13:17
393 查看
本文由论坛会员bimeteorf分享
实现了苹果的选取器,与苹果自带的选取器相比有以下特点:
单行,横向放置,大小可配置,内容可配置且方法简单,同时可容纳文字和图片
(1) tasks:
-(id)initWithFrame:(CGRect)frame array:(NSArray*)list row:(int)aRow;
-(int)index;
(2)discussions:
1)-(id)initWithFrame:(CGRect)frame array:(NSArray*)list row:(int)aRow;
arguments:
frame: the frame of the component view
list: the content listed on the component view, in format of NSString and UIImage only
row: the number of row displaying on the component, limited to be 1,3,5 and 7 only
return value: a subclass of UIView
2)-(int)index;
return value: to indicate which section is chosen.
(3)attentions:
the background image is in the format "png", so it may looks ugly when scaling it
or setting its frame some times. when that happens, it is suggested to rescale it or
change the image in the file "bg.png"
效果如图:
![](https://oscdn.geek-share.com/Uploads/Images/Content/2015036/d81e332b06f013819d8c9f5152daca10.png)
原帖地址:http://www.cocoachina.com/bbs/read.php?tid=66614
源码下载:
![](https://oscdn.geek-share.com/Uploads/Images/Content/2015036/a065f00a69d0fde0832721bb1b6f91de.gif)
WDataPicker
实现了苹果的选取器,与苹果自带的选取器相比有以下特点:
单行,横向放置,大小可配置,内容可配置且方法简单,同时可容纳文字和图片
(1) tasks:
-(id)initWithFrame:(CGRect)frame array:(NSArray*)list row:(int)aRow;
-(int)index;
(2)discussions:
1)-(id)initWithFrame:(CGRect)frame array:(NSArray*)list row:(int)aRow;
arguments:
frame: the frame of the component view
list: the content listed on the component view, in format of NSString and UIImage only
row: the number of row displaying on the component, limited to be 1,3,5 and 7 only
return value: a subclass of UIView
2)-(int)index;
return value: to indicate which section is chosen.
(3)attentions:
the background image is in the format "png", so it may looks ugly when scaling it
or setting its frame some times. when that happens, it is suggested to rescale it or
change the image in the file "bg.png"
效果如图:
![](https://oscdn.geek-share.com/Uploads/Images/Content/2015036/d81e332b06f013819d8c9f5152daca10.png)
原帖地址:http://www.cocoachina.com/bbs/read.php?tid=66614
源码下载:
![](https://oscdn.geek-share.com/Uploads/Images/Content/2015036/a065f00a69d0fde0832721bb1b6f91de.gif)
WDataPicker
相关文章推荐
- 图像及动画处理六:选取器(dataPicker仿苹果)
- 图像及动画处理六:选取器(dataPicker仿苹果)
- 图像及动画处理四:旋转等待条(仿苹果)
- 图像及动画处理四:旋转等待条(仿苹果)
- 图像及动画处理四:旋转等待条(仿苹果)
- Android的图形与图像处理之六 SurfaceView实现动画
- 2012-02-14 00:09 图像及动画处理三:WaitingBar
- 图像识别与处理之Opencv——选取图像局部区域
- 图像及动画处理三:WaitingBar
- 【Android开发】图形图像处理技术-实现Android动画的两种方式
- 图像像素处理_明度/亮度/平均值/灰褐色/滤镜/灰色_canvas_js动画
- 图像及动画处理一:图片切割
- Android L(5.0)源码之图形与图像处理之动画——Frame、Tween、属性动画、SurfaceView
- 图像处理api及动画api相关工作
- MBProgressHUD的使用---图像及动画处理三:WaitingBar
- 图像及动画处理三:WaitingBar
- 图像处理-找出三个苹果中最大的一个
- Android图形与图像处理-补间动画
- 第八章、图像处理与动画制作——图像控件和计时器的应用