标签:style color io for ar cti 时间 ad
用处:选择日期或时间 当选择新的日期或时间的时候,值改变事件会被触发
-(void)viewDidLoad
{
CGRect frame = CGRectMake(20,20,320,100);
self.datePicker = [[UIDatePicker alloc]initWithFrame:frame];
//设置显示模式
self.datePicker.datePickerMode = UIDatePickerModeDate;
[self.view addSubView:self.datePicker];
CGRect framelbl = CGRectMake(0,300,320,50);
self.label = [[UILable alloc]initWithFrame:framelbl];
[self.view addSubView:self.label];
//添加值改变事件
[self.datePicker addTarget:self action:@selector(change:) forControlEvents:UIControlEventValueChanged];
}
标签:style color io for ar cti 时间 ad
原文地址:http://www.cnblogs.com/AngryCooder/p/3897578.html