zoukankan      html  css  js  c++  java
  • iOS8中的UIActionSheet添加UIDatePicker后,UIDatePicker不显示问题

    解决方法:

     
    IOS8以前:

                        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];

  • 相关阅读:
    php与nginx配置,不能运行php程序
    奇葩php之数组
    奇葩之mysql
    for语法研究
    php short tag不显示排查
    奇葩之mysql【三】我只想获得一个自增Id,我容易吗我
    男女不同
    Restart explorer
    iOS面试贴士
    phpmyadmin万能登陆密码
  • 原文地址:https://www.cnblogs.com/isItOk/p/4875549.html
Copyright © 2011-2022 走看看