如材料设计文档中所述,MDCTextField 禁用状态不起作用
这是一个错误,还是我做错了什么?
@interface MyController ()
@property (nonatomic, strong) MDCTextInputControllerOutlined *textInputController;
@property (nonatomic, strong) MDCTextField *textField;
@end
@implementation MyController
- (void)viewDidLoad {
[super viewDidLoad];
self.textField = [[MDCTextField alloc] initWithFrame:CGRectMake(50.f, 50.f, 220.f, 85.f)];
[self.view addSubview:self.textField];
self.textInputController = [[MDCTextInputControllerOutlined alloc] initWithTextInput:self.textField];
self.textInputController.normalColor = [UIColor purpleColor];
self.textInputController.disabledColor = [UIColor redColor];
self.textField.enabled = NO;
self.textField.placeholder = @"placeholder";
self.textField.text = @"text";
}