ASDK相关

08.ASDK整理:将UIKit控件 封装成node使用

2017-09-28  本文已影响19人  黄x黄
- (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;
}
上一篇下一篇

猜你喜欢

热点阅读