UITextFieldDelegate协议中各个方法的作用
控制当前输入框是否能被编辑
- (BOOL)textFieldShouldBeginEditing:(UITextField
*)textField
当输入框开始时触发(获得焦点触发)
- (void)textFieldDidBeginEditing:(UITextField
*)textField
询问...
分类:
移动开发 时间:
2014-08-24 11:41:12
阅读次数:
218
1.UITextField的初始化和设置 textField = [[UITextField alloc] initWithFrame:CGRectMake(120.0f, 80.0f, 150.0f, 30.0f)]; [textField setBorderStyle:UITextBorde.....
分类:
其他好文 时间:
2014-08-23 11:05:50
阅读次数:
214
一.点击textField没有响应
(1)textField上面还有视图(如下)
UITextField *tf = [[UITextField alloc] initWithFrame:CGRectMake(50, 100, 220, 40)];
tf.backgroundColor = [UIColor yellowColor];
tf.borderSt...
分类:
其他好文 时间:
2014-08-23 08:50:00
阅读次数:
149
自定义TextField的删除按钮#import @interface CustomTextField : UITextField@property(strong,nonatomic)NSString * alwaysShowStr;@end@interface CustomTextField ()...
分类:
其他好文 时间:
2014-08-22 10:42:06
阅读次数:
145
创建一个类封装uitextfield和UIlabel (源代码.m文件)
#import "TLView.h"
@interface TLView ()
{
UILabel *_desLabel;
//左边的lable
UITextField *_textField;//右边的
}
@end
@implementatio...
分类:
移动开发 时间:
2014-08-21 13:28:14
阅读次数:
643
源代码(.m文件)
#import "TLView.h"
//本类的延展
@interface TLView ()
{
UILabel *_desLabel;
//左边的lable
UITextField *_textField;//右边的lable
}
@end
@implementation...
分类:
其他好文 时间:
2014-08-21 13:27:14
阅读次数:
165
@interface LTView : UIView
//1.是否采用安全模式
- (void)setSecureEntry:(BOOL)secureEntry;
//2.设置键盘的类型
- (void)setKeyBoardType:(UIKeyboardType)keyBoardType;
//3.设置textField代理
- (void)setDelegate:(id)delegate;
...
分类:
其他好文 时间:
2014-08-21 09:52:33
阅读次数:
232
一.键盘通知当文本View(如UITextField,UITextView,UIWebView内的输入框)进入编辑模式成为first responder时,系统会自动显示键盘。成为firstresponder可能由用户点击触发,也可向文本View发送becomeFirstResponder消息触发。...
分类:
移动开发 时间:
2014-08-20 16:17:42
阅读次数:
292
键盘类型 :1.UIKeyboardTypeDefault 默认键盘 2.UIKeyboardTypeASCIICapable 显示ASCII码值得键盘3.UIKeyboardTypeNumbersAndPunctuation显示数字和标点符号得键盘4.UIKeyboardTypeURL显示带有 ....
分类:
其他好文 时间:
2014-08-20 16:06:32
阅读次数:
223
一.UILabel 是ioS中开发用来显示文字的控件,是UIView的子类,所以具体UIView的所有功能,只不过比UIView多了文字显示的功能,
使用过程也是分四步:
1.创建对象
2.配置属性
3.添加到父视图
4.释放所有权
重点:不同的控件之间只是配置的属性的不同,也就是差异所在,所以学习一个新的控件,只有配置该控件独有的属性即...
分类:
其他好文 时间:
2014-08-20 10:34:16
阅读次数:
235