zoukankan      html  css  js  c++  java
  • UITextField 键盘

    [UITextField BecomeFirstResponder]启用键盘

    [UITextField ResignFirstResponder]关闭键盘

    UITextField.enablesReturnKeyAutomatically = YES当UITextField不为空时高亮。


    UITextField.keyboardType为键盘类型。


    UITextField.clearButtonMode:清空输入的字符,有以下几种模式


         UITextFieldViewModeAlways,不为空,获得焦点与没有获得焦点都显示清空按钮


         UITextFieldViewModeNever,不显示清空按钮


         UITextFieldViewModeWhileEditing,不为空,且在编辑状态时(及获得焦点)显示清空按钮


         UITextFieldViewModeUnlessEditing, 不为空,且不在编译状态时(焦点不在输入框上)显示清空按钮

    label.textAlignment = UITextAlignmentLeft;


    label.textAlignment = UITextAlignmentCenter;


    label.textAlignment = UITextAlignmentRight; 文字对其方式


    UITextFieldDelegate协议:

    欢迎光临小站 好岸园 http://www.hopean.com
  • 相关阅读:
    题目1101:计算表达式
    九度oj 题目1107:搬水果
    [Hihocoder] 字符串排序
    [hzwer] 模拟T
    [Luogu] 宝藏
    [Luogu] 列队
    [Luogu] 奶酪
    [Luogu] 逛公园
    [Luogu] 时间复杂度
    [Luogu] 小凯的疑惑
  • 原文地址:https://www.cnblogs.com/hopeanCom/p/3047040.html
Copyright © 2011-2022 走看看