代码库> 选择器> 时间选择器
时间选择器
关注
上传者:木木彡24 分类:选择器(Pickerview)
查看次数:3351 下载次数:1133
上传时间:2016-04-16 大小:67 B
- (void)viewDidLoad {
[super viewDidLoad];
_textField.delegate = self;

_cuiPickerView = [[CuiPickerView alloc]init];
_cuiPickerView.frame = CGRectMake(0, self.view.frame.size.height, self.view.frame.size.width, 200);

//这一步很重要
_cuiPickerView.myTextField = _textField;

_cuiPickerView.delegate = self;
_cuiPickerView.curDate=[NSDate date];
[self.view addSubview:_cuiPickerView];

}

//开始编辑
-(void)textFieldDidBeginEditing:(UITextField *)textField
{
textField.inputView = [[UIView alloc]initWithFrame:CGRectZero];
[_cuiPickerView showInView:self.view];
}

//赋值给textField
-(void)didFinishPickView:(NSString *)date
{
self.dataString = date;
_textField.text = date;
}
收藏
我来说两句
发表评论
您还没有登录!请登录注册
所有评论(0
综合评论
提示
sina weixin mail 回到顶部