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

  • 相关阅读:
    位运算的简单简要
    Date()函数详细参数
    Android画图之Matrix(二)
    图像渐变特效的简单介绍
    Android MotionEvent中getX()和getRawX()的区别
    Timer计时器
    android中raw文件夹和asset文件夹的共同点和区别
    Selector、shape详解
    select语句后以for update结尾
    Openfire(原来的Wildfire) 在 Web 2.0 中的作用
  • 原文地址:https://www.cnblogs.com/isItOk/p/4875549.html
Copyright © 2011-2022 走看看