zoukankan      html  css  js  c++  java
  • ios9 之后,Xcode7不推荐使用UIAlertView,改用UIAlertController+UIAlertAction(按钮)

            /**

             *  ios9 之后,Xcode7不推荐使用UIAlertView,改用UIAlertController+UIAlertAction(按钮)

             */

            UIAlertController *alertCtrl = [UIAlertController alertControllerWithTitle:@"First" message:@"第一次进入app" preferredStyle:UIAlertControllerStyleAlert];

            UIAlertAction *leftAction = [UIAlertAction actionWithTitle:@"确定" style: UIAlertActionStyleDefault handler:nil];

            UIAlertAction *rightAction = [UIAlertAction actionWithTitle:@"取消" style:UIAlertActionStyleDefault handler:nil];

            [alertCtrl addAction:leftAction];

            [alertCtrl addAction:rightAction];

            //当是多个按钮的时候,会变成一列按钮。。。

            [self presentViewController:alertCtrl animated:YES completion:nil];

  • 相关阅读:
    非旋Treap——fhq treap
    LCA
    树链剖分
    复习计划
    BZOJ2565: 最长双回文串(回文树)
    回文自动机
    luogu P3796 【模板】AC自动机(加强版)
    【BZOJ2908】 又是nand
    【HDU2460】 Network
    【CF786B】 Legacy
  • 原文地址:https://www.cnblogs.com/lrr0618/p/5160634.html
Copyright © 2011-2022 走看看