UItextview与UItextfield的区别及uitextview用法
来源:互联网 发布:app相册制作软件 编辑:程序博客网 时间:2024/05/21 10:27
IOS中的UITextView和UITextField都是文本输入控件并都能够调用系统键盘。
UITextField :
只能输入一行,不可以滚动显示浏览全文,可以设置提醒文字(有placeholder属性),有占位,继承自UIView[UIControl]。
UITextView:
能输入多行,可以滚动显示浏览全文,不可以设置提醒文字(没有placeholder属性),无占位,继承自UIScrollView。
占位:UIBarButtonSystemItemFlexibleSpace
1,UITextView
我们可以在- (void)textViewDidChange:(UITextView *)textView[检测到输入变化的时候执行]和
- (BOOL)textView:(UITextView *)textView shouldChangeTextInRange:(NSRange)range replacementText:(NSString *)text[超过一定字数返回NO即可]
2,UITextField
简单的方法只能在 - (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string; 方法中处理。
链接:http://www.jianshu.com/p/889a87595a51
uitextview
链接:http://www.jianshu.com/p/14385b1db4f3
阅读全文
0 0
- UItextview与UItextfield的区别及uitextview用法
- 14、UITextField 与 UITextView 的区别-OC+UI
- iOS知识点总结——UITextField与 UITextView的区别
- 【UITextField与UITextView】
- UITextView的用法及技巧
- UITextView的用法及技巧
- UITextView的用法及技巧
- iOS- UITextField和UITextView区别
- UITextView UITextField
- UITextView UITextField
- UITextField && UITextView
- IOS 之 UITextField与UITextView
- UITextView的用法
- UITextView的基本用法
- UITextView 的简单用法
- UITextView的基本用法
- UITextView控件的用法
- 使用UITextView的问题及自定义UITextView
- Unity移动障碍物设置
- 【已解决】Django传递数据到js提示Unexpected token
- 记,一次vivado_hls使用gcc编译错误的解决
- eclipse中代码push到github每次要输入github仓库地址
- SpringInAction学习笔记——第14章 保护方法应用
- UItextview与UItextfield的区别及uitextview用法
- Codeforces AIM TECH Round 4 (Div 2) 题解 (ABCD)
- 561. Array Partition I
- recycleview 搞效率刷新
- Hibernate知识点概述
- 欢迎使用CSDN-markdown编辑器
- Spring管理事务默认回滚的异常是什么?
- 2017年中OTT运营大数据蓝皮书
- CCF 201604-4 游戏