美文网首页
UIAlertView上添加View(UIDatePicker)

UIAlertView上添加View(UIDatePicker)

作者: 悲酥清风__ | 来源:发表于2015-12-25 17:12 被阅读122次

    UIAlertView *alert = [[UIAlertView alloc] initWithTitle:nil message:nil delegate:self cancelButtonTitle:@"取消" otherButtonTitles:@"确定", nil];

    alert.delegate = self;

    datePicker = [[UIDatePicker alloc] init];

    datePicker.datePickerMode = UIDatePickerModeDate;

    [alert setValue:datePicker forKey:@"accessoryView"];//关键句

    [alert show];


    相关文章

      网友评论

          本文标题:UIAlertView上添加View(UIDatePicker)

          本文链接:https://www.haomeiwen.com/subject/rvtbhttx.html