UIAlertController *alertController = [UIAlertController alertControllerWithTitle:nil message:@"请输入支付密码" preferredStyle:UIAlertControllerStyleAlert];

    //增加取消按钮;

    [alertController addAction:[UIAlertAction actionWithTitle:@"取消" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {

    }]];

    //增加确定按钮;

    [alertController addAction:[UIAlertAction actionWithTitle:@"确定" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {

        //获取第1个输入框;

        UITextField *userNameTextField = alertController.textFields.firstObject;

        NSLog(@"支付密码 = %@",userNameTextField.text);

    }]];

    //定义第一个输入框;

    [alertController addTextFieldWithConfigurationHandler:^(UITextField * _Nonnull textField) {

        textField.placeholder = @"请输入支付密码";

        textField.secureTextEntry = YES;

    }];

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

最新文章

  1. 完美解决window.navigator.geolocation.getCurrentPosition,在IOS10系统中无法定位问题
  2. WPF之自定义控件
  3. fnc.tld学习编写
  4. 快速入门系列--WebAPI--04在老版本MVC4下的调整
  5. 创建Maven项目
  6. C# 使用Trace记录程序日志
  7. C++ TrieTree(字典树)容器的实现
  8. 利用 NGINX 最大化 Python 性能,第一部分:Web 服务和缓存
  9. Xml文件保存值不能及时更新
  10. STL总结之bitset
  11. [TypeScript] Generating Definition Files
  12. How to decompile class file in Java and Eclipse - Javap command example(转)
  13. Oracle 收集统计信息11g和12C在差异
  14. poptest交流QQ群
  15. 微信小程序左滑删除功能
  16. Acm弱校奋斗史
  17. 文本分布式表示(二):用tensorflow和word2vec训练词向量
  18. Mysql的两种偏移量分页写法
  19. 1.01-url-open_code
  20. 剑指Offer-- 翻转链表 (python版)

热门文章

  1. input函数报错"*** is not defined"
  2. day04 python入门(变量,基本数据类型)
  3. Windows配置Delve的测试环境
  4. python 爬虫:HTTP ERROR 406
  5. scrapy 基础组件专题(二):下载中间件
  6. disconf原理解析
  7. 定时器三----js定时器
  8. Python Ethical Hacking - BACKDOORS(8)
  9. C++语法小记---面向对象模型(实例的内存分布)
  10. C++语法小记---前置操作符和后置操作符