zoukankan      html  css  js  c++  java
  • 输入文本框设置

    今天就给大家分享个简单的输入文本框吧!!!欢迎大家给意见,后续精彩继续更新中。

    UIAlertController *alertController = [UIAlertController alertControllerWithTitle:@"标题" message:nil

     preferredStyle:UIAlertControllerStyleAlert];

        _progressText.placeholder = @"占位符";

        

        [alertController addTextFieldWithConfigurationHandler:^(UITextField *textField) {

            textField.placeholder = _progressText.placeholder;

            textField.keyboardType = UIKeyboardTypeDefault;

            _progressText = textField;

        }];

        UIAlertAction *cancelAction = [UIAlertAction actionWithTitle:@"取消" style:UIAlertActionStyleCancel handler:^(UIAlertAction *action) {

            return ;

        }];

        

        UIAlertAction *otherAction = [UIAlertAction actionWithTitle:@"确定" style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) {

            //要做的事情

        }];

           [alertController addAction:cancelAction];

        [alertController addAction:otherAction];

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

  • 相关阅读:
    测试阅读量
    JS中的 length, var i = [1,2]; i[length], 与 i.length, i["length"]的区别
    微信小程序:button组件的边框
    mongo学习笔记
    C言语语法总结(随时更新)
    Vim 常用命令总结
    php 文件操作
    git常用命令
    递归方式转迭代方式
    ECMAScript6 ES6 ES2015新语法总结
  • 原文地址:https://www.cnblogs.com/Ruby-Hua/p/5782703.html
Copyright © 2011-2022 走看看