zoukankan      html  css  js  c++  java
  • iOS 更换键盘的return键的形式

    iOS 右下角的return键有很多形式,比如发送,完成换行等,在遵循代理之后调用

    -(BOOL)textFieldShouldReturn:(UITextField *)textField{

    returnYES;
    

    } 此方法,系统默认return键的提示字为换行,我们可以在创建textfield时候修改系统return的提示

    textField.returnKeyType = UIReturnKeyDone;​

    如右图所示(此为英文版下的键盘)

    这里写图片描述 
    ​另外还有其他样式

    textField.returnKeyType = UIReturnKeySend;

    typedef NS_ENUM(NSInteger, UIReturnKeyType) {

    UIReturnKeyDefault,

    UIReturnKeyGo,//去往

    UIReturnKeyGoogle,

    UIReturnKeyJoin,//加入

    UIReturnKeyNext,//下一步

    UIReturnKeyRoute,

    UIReturnKeySearch,//搜索

    UIReturnKeySend,//发送

    UIReturnKeyYahoo,

    UIReturnKeyDone,//完成

    UIReturnKeyEmergencyCall,

    UIReturnKeyContinue NS_ENUM_AVAILABLE_IOS(9_0)

    ,};

    当然,要显示中文,还得设置info.plist中Localization native development region 为 cn​

  • 相关阅读:
    UIButton组件
    九宫格
    window对象的创建
    UILabel的属性及方法
    javascript相关,格式转化
    MySQL分区分表相关知识摘要
    redis简单笔记
    PHP常用设计模式
    在nginx上面部署多个项目
    把自己的项目上传到svn上面
  • 原文地址:https://www.cnblogs.com/sunfuyou/p/6647250.html
Copyright © 2011-2022 走看看