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

  • 相关阅读:
    Redis主从复制
    POI导出给指定单元格添加背景色
    Mybatis的resultMap使用
    前后端分离
    日常总结
    java环境变量配置
    Java线程池七个参数详解
    java中常见的锁
    Linux定时任务
    SQL语句的整理
  • 原文地址:https://www.cnblogs.com/isItOk/p/4875549.html
Copyright © 2011-2022 走看看