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

  • 相关阅读:
    Golang初学者的资源整理
    Mesos和kubernetes
    Go by Example
    dbus 和 policykit 实例篇(python) ()转
    CentOS7卸载KDE桌面(转)
    Please read “Security” section of the manual to find out how to run mysqld as root!错误解决(转)
    yum使用总结(转)
    Linux rpm 命令参数使用详解[介绍和应用](转)
    nginx+lua+redis高并发应用建设
    python网络爬虫进入(一)——简单的博客爬行动物
  • 原文地址:https://www.cnblogs.com/isItOk/p/4875549.html
Copyright © 2011-2022 走看看