标签:style blog http io color ar sp for div
// 初始化UIDatePicker UIDatePicker *datePicker = [[UIDatePicker alloc] initWithFrame:CGRectMake(0, 200, 320, 216)]; // 设置时区 [datePicker setTimeZone:[NSTimeZone timeZoneWithName:@"GMT"]]; // 设置当前显示时间 [datePicker setDate:tempDate animated:YES]; // 设置显示最大时间(此处为当前时间) [datePicker setMaximumDate:[NSDate date]]; // 设置UIDatePicker的显示模式 [datePicker setDatePickerMode:UIDatePickerModeDate]; // 当值发生改变的时候调用的方法 [datePicker addTarget:self action:@selector(datePickerValueChanged:) forControlEvents:UIControlEventValueChanged]; [self.view addSubview:datePicker]; [datePicker release]; // 获得当前UIPickerDate所在的时间 NSDate *selected = [datePicker date];
http://blog.sina.com.cn/s/blog_621403ef0100yt8v.html
标签:style blog http io color ar sp for div
原文地址:http://www.cnblogs.com/apem/p/4082791.html