摘要:
文字属性textplaceholder //默认使用70%灰色 font textColor textAlignment文字大小adjustsFontSizeToFitWidthminimumFontSize编辑行为editing //是否正在编辑(read-only)clearsOnBeginEditing展现形态borderStyle //默认UITextBorderStyleNone,是UITextBorderStyleRoundedRect时自定义的background无效backgrounddisabledBackgroundproperty //backgrou... 阅读全文
摘要:
重写UITextField方法:-(CGRect)textRectForBounds:(CGRect)bounds;效果如图:-------->-(CGRect)editingRectForBounds:(CGRect)bounds;@interfaceMYTextField:UITextField@end@implementationMYTextField-(CGRect)textRectForBounds:(CGRect)bounds { int margin =10; CGRect inset =CGRectMake(bounds.origin.x + margin, bounds 阅读全文