08.ASDK整理:将UIKit控件 封装成node使用
作者:
黄x黄 | 来源:发表于
2017-09-28 16:09 被阅读19次- (instancetype)init {
......
_textFieldNode =
[[ASDisplayNode alloc] initWithViewBlock:^UIView *_Nonnull {
return [[UITextField alloc] init];
}];
_textFieldNode.backgroundColor = [UIColor clearColor];
......
}
- (void)didLoad {
[super didLoad];
UITextField *textField = (UITextField *)_textFieldNode.view;
textField.layer.borderColor = [UIColor colorWithRGB:KYTLineColor].CGColor;
textField.layer.borderWidth = 1.0;
textField.textAlignment = NSTextAlignmentCenter;
textField.returnKeyType = UIReturnKeyDone;
textField.enabled = NO;
}
本文标题:08.ASDK整理:将UIKit控件 封装成node使用
本文链接:https://www.haomeiwen.com/subject/ddqvextx.html
网友评论