IInput - 文本输入框

IInput 是 UITextField 的继承, 实现了控件的流式布局, 同时, 你仍然可以使用 UITextField 的所有功能和属性.

XML

<input style="background: #f33;" value="123" />

API

@interface IInput : IView

+ (IInput *)textInput;
+ (IInput *)passwordInput;

@property (nonatomic, readonly) UITextField *textField;
@property (nonatomic) NSString *value;
@property (nonatomic) NSString *placeholder;

- (BOOL)isPasswordInput;
- (void)setIsPasswordInput:(BOOL)yesno;

@end

Demo

IInput *input = [[IInput alloc] init];
input.placeholder = @"Name";