创建文本输入框 UITextField * textField = [[UITextField alloc]initWithFrame:CGRectMake(50, 50, 250, 40)];设置边框样式 textField.borderStyle = UITextBorderStyl...
分类:
移动开发 时间:
2015-11-24 06:16:18
阅读次数:
263
//1、 UITextField *textField = [[UITextField alloc] initWithFrame:CGRectMake(30, 100, 260, 40)]; //2、// textField.backgroundColor = [UIColor r...
分类:
其他好文 时间:
2015-11-23 18:33:35
阅读次数:
128
(一)UILabel空件属性:1.背景颜色 label.backgroundColor = [UIColor ***];2. 显示文字: label.text = @"******";3.改变文字颜色:label.text = [UIColor ***];4.调整文字字体大小: label.fon....
分类:
其他好文 时间:
2015-11-21 22:47:05
阅读次数:
128
首先还是先来初始化UITextField * textField = [[UITextField alloc]initWithFrame:CGRectMake属性设置和获取文字框文字:@property(nonatomic,copy) NSString *text;通过AttributedStrin...
分类:
其他好文 时间:
2015-11-21 21:03:34
阅读次数:
122
1.UITextField1??:初始给值UITextField *textfield1= [[UITextField alloc]initWithFrame:CGRectMake(100, 100, 150, 40)];textfield1.backgroundColor = [UIColor c...
分类:
其他好文 时间:
2015-11-21 18:22:24
阅读次数:
164
一、UITextFielddelegate- (BOOL)textFieldShouldBeginEditing:(UITextField *)textField{ //返回一个BOOL值,指定是否循序文本字段开始编辑 return YES; } - (void)textFieldDidBeginE...
分类:
其他好文 时间:
2015-11-20 12:36:10
阅读次数:
98
关于隐藏软键盘,网上的办法良莠不齐,大多是通过实现UITextFieldDelegate来隐藏软键盘,该方法代码较多,且在文本框很多的时不好处理。我经过搜索与摸索,找到了最佳的处理办法。(引用的)一、隐藏自身软键盘 当对于有多个UITextField控件都想通过点击“Return”来隐藏自身软键盘....
分类:
其他好文 时间:
2015-11-19 00:40:56
阅读次数:
197
1.回收某个textField下弹出的键盘1 - (BOOL)textFieldShouldReturn:(UITextField *)textField{2 3 [textField resignFirstResponder];4 return YES;5 6 }2.点击空白处回收...
分类:
移动开发 时间:
2015-11-17 19:02:01
阅读次数:
236
一.使用OC1.首先,要添加代理 UITextFieldDelegate2.设置代理 textField.delegate = self;3.实现协议中的方法//点击return收回键盘- (BOOL)textFieldShouldReturn:(UITextField *)textField{//...
分类:
移动开发 时间:
2015-11-17 17:00:41
阅读次数:
162
需求 手机号号码 15288888888 ------->152 8888 8888 银行卡号 8888888888888888888 ----->8888 8888 8888 8888 888实现 在UITextFiled输入时候就实现号码格式化在UITextField代理方法 shouldCha...
分类:
移动开发 时间:
2015-11-16 22:42:28
阅读次数:
1118