![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
------UITextField_UITextview
文章平均质量分 63
Gaos的BLOG
Had I not seen the Sun
I could have borne the shade
But Light a newer Wilderness
My Wilderness has made
展开
-
IOS UITextField &UITextView-持续更新
限制textField长度 [[NSNotificationCenter defaultCenter]addObserver:self selector:@selector(textFiledEditChanged:) name:@"UITextFieldTextDidChangeNotification原创 2015-05-18 10:24:23 · 1149 阅读 · 2 评论 -
iOS开发系列之四 - UITextView 用法小结
// 初始化输入框并设置位置和大小 UITextView *textView = [[UITextView alloc] initWithFrame:CGRectMake(10, 10, 300, 180)]; // 设置预设文本 textView.text = @""; // 设置文本字体 textView.font = [UIFont fontWithName:@转载 2015-08-19 12:22:01 · 531 阅读 · 0 评论 -
iOS开发系列之三 - UITextField 用法小结
// 初始化输入框并设置位置和大小 UITextField *textField = [[UITextField alloc] initWithFrame:CGRectMake(10, 100, 300, 30)]; // 设置输入框提示 textField.placeholder = @"TextField Tip"; // 输入框中预先输入的文字 textFiel转载 2015-08-19 12:17:31 · 488 阅读 · 0 评论 -
改变UITextField placeHolder颜色、字体 、输入光标位置等
我们有时需要定制化UITextField对象的风格,可以添加许多不同的重写方法,来改变文本字段的显示行为。这些方法都会返回一个CGRect结构,制定了文本字段每个部件的边界范围,甚至修改placeHolder颜色,字体。 – textRectForBounds: //重写来重置文字区域 – drawTextInRect: //改变绘文字属性.重写时转载 2016-02-19 14:58:10 · 454 阅读 · 0 评论 -
iOS-UITextField中给placeholder动态设置颜色的四种方法
思路分析: 0.自定义UITextField1.设置占位文字的颜色找-->placeholderColor,结果发现UITextField没有提供这个属性2.在storyboard/xib中寻找设置placeholder的属性,也没有发现3.发现UITextField中有- (void)drawPlaceholderInRect:(CGRect)rect;,这个方法用到QuartzD中的知识转载 2016-09-18 21:21:55 · 841 阅读 · 0 评论 -
IOS开发之所有类型的UIKeyboardType图片展示
在使用UITextField的时候,我们经常会有需求来控制打开的键盘的类型,虽然文档里都有相应类型的说明,但都不够直观。现在,把所有的UIKeyboardType来以图片展示下。可以直观的来选择所需的键盘种类。 UIKeyboardTypeAlphabet转载 2015-05-18 11:52:41 · 385 阅读 · 0 评论 -
IOS输入校验
- 1.匹配住允许中文和字母* 或者下边4.检查含有数字标点 取反-(BOOL)checkName:(NSString *)_text { NSString *Regex = @"^[A-Za-z\u4e00-\u9fa5]*$"; NSPredicate *Test = [NSPredicate predicateWithFormat:@"SELF MATCHES %@", Re原创 2015-04-29 16:05:43 · 624 阅读 · 0 评论 -
IOS 输入校验
1、数字字符校验 #define NUMBERSPERIOD @"0123456789." -(BOOL)checkNumber:(NSString *)string { NSCharacterSet*cs; cs =[[NSCharacterSet characterSetWithCharactersInString:NUMBERSPERI转载 2015-01-21 18:13:21 · 492 阅读 · 0 评论 -
键盘退出方式 键盘遮挡
#pragma mark - #pragma mark 解决虚拟键盘挡住UITextField的方法 - (void)keyboardWillShow:(NSNotification *)noti { //键盘输入的界面调整 //键盘的高度 float height = 216.0; CGRect frame = self.view.frame;转载 2015-01-21 10:10:11 · 547 阅读 · 0 评论