1

如材料设计文档中所述,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";
}
4

1 回答 1

0

感谢您使用 MDC-iOS。我可以确认这是一个错误。请在 github 上创建一张票。它将被分类。您可以从那里关注问题,甚至可以提交 PR 来纠正其中的一部分!

于 2018-08-01T19:36:53.277 回答