zoukankan      html  css  js  c++  java
  • textField代理方法

    //textField代理方法
    // 返回no 不能输入文字
    - (BOOL)textField:(UITextField*)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString*)string

    // 进入编辑模式
    - (void)textFieldDidBeginEditing:(UITextField*)textField

    // 设置中文(locale属性)
    datePicker.locale = [[NSLocale alloc] initWithLocaleIdentifier:@"zh_CN"];

    // 添加一个监听 来监听datepicker的日期选择
    [datePicker addTarget:self action:@selector(didSelectDate:) forControlEvents:UIControlEventValueChanged];

    // 设置显示格式
    datePicker.datePickerMode = UIDatePickerModeDate;

    // textField自定义键盘视图
    textField.inputView
    // textField辅助视图
    textField.inputAccessoryView

    toolbar 只能放 barbuttonitem

  • 相关阅读:
    毕业论文格式
    2018.12.14
    关于百度搜索引擎的优缺点
    2018.12.13
    2018.12.12
    2018.12.11
    2108.12.10
    2018.12.9
    2018.12.8
    2018.12.7
  • 原文地址:https://www.cnblogs.com/AgentLXJ/p/5063745.html
Copyright © 2011-2022 走看看