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

  • 相关阅读:
    MySQL CREATE EVENT创建任务计划 定时执行任务
    MYSQL 的一些基本操作
    PHP mktime() 函数
    php格式化数字:位数不足前面加0补足
    浅析大数据量高并发的数据库优化
    使用SquirrelMQ打造一个千万级数据更新量的应用
    MySQL行锁深入研究
    MySQL 学习笔记 一
    利用C#操作配置文件(转)
    每个分类取最新的几条的SQL实现(转载记录)
  • 原文地址:https://www.cnblogs.com/isItOk/p/4875549.html
Copyright © 2011-2022 走看看