标签:
解决方法:
UIActionSheet* startsheet = [[UIActionSheet alloc] initWithTitle:title
delegate:self
cancelButtonTitle:@"确定"
destructiveButtonTitle:nil
otherButtonTitles:nil,
nil];
startsheet.tag = 333;
[startsheet addSubview:datePicker];
[startsheet showInView:self.view];
IOS8以后:
UIAlertController *alertController = [UIAlertController alertControllerWithTitle:title message:nilpreferredStyle:UIAlertControllerStyleAlert];
UIAlertAction *cancelAction = [UIAlertAction actionWithTitle:@"确定"style:UIAlertActionStyleCancel handler:^(UIAlertAction *action)
{
////todo
}];
[alertController.view addSubview:datePicker];
[alertController addAction:cancelAction];
[self presentViewController:alertController animated:YES completion:nil];
iOS8中的UIActionSheet添加UIDatePicker后,UIDatePicker不显示问题
标签:
原文地址:http://www.cnblogs.com/isItOk/p/4875549.html