21
21
22
22
#import " MDCTextControlLabelBehavior.h"
23
23
#import " MDCFilledTextArea.h"
24
- #import " MDCFilledTextArea+MaterialTheming.h"
25
24
#import " MDCOutlinedTextArea.h"
26
25
#import " MDCOutlinedTextArea+MaterialTheming.h"
27
26
@@ -46,7 +45,6 @@ - (MDCFilledTextArea *)createMaterialFilledTextArea {
46
45
if (self.shouldAddDebugLeadingView ) {
47
46
[self addLeadingViewToTextArea: textArea];
48
47
}
49
- [textArea applyThemeWithScheme: self .containerScheme];
50
48
return textArea;
51
49
}
52
50
@@ -199,10 +197,7 @@ - (void)applyThemesToTextAreas {
199
197
enumerateObjectsUsingBlock: ^(MDCBaseTextArea *textArea, NSUInteger idx, BOOL *stop) {
200
198
BOOL isEven = idx % 2 == 0 ;
201
199
if (self.isErrored ) {
202
- if ([textArea isKindOfClass: [MDCFilledTextArea class ]]) {
203
- MDCFilledTextArea *filledTextArea = (MDCFilledTextArea *)textArea;
204
- [filledTextArea applyErrorThemeWithScheme: self .containerScheme];
205
- } else if ([textArea isKindOfClass: [MDCOutlinedTextArea class ]]) {
200
+ if ([textArea isKindOfClass: [MDCOutlinedTextArea class ]]) {
206
201
MDCOutlinedTextArea *outlinedTextArea = (MDCOutlinedTextArea *)textArea;
207
202
[outlinedTextArea applyErrorThemeWithScheme: self .containerScheme];
208
203
}
@@ -214,10 +209,7 @@ - (void)applyThemesToTextAreas {
214
209
textArea.leadingAssistiveLabel .text = @" This is an error." ;
215
210
}
216
211
} else {
217
- if ([textArea isKindOfClass: [MDCFilledTextArea class ]]) {
218
- MDCFilledTextArea *filledTextArea = (MDCFilledTextArea *)textArea;
219
- [filledTextArea applyThemeWithScheme: self .containerScheme];
220
- } else if ([textArea isKindOfClass: [MDCOutlinedTextArea class ]]) {
212
+ if ([textArea isKindOfClass: [MDCOutlinedTextArea class ]]) {
221
213
MDCOutlinedTextArea *outlinedTextArea = (MDCOutlinedTextArea *)textArea;
222
214
[outlinedTextArea applyThemeWithScheme: self .containerScheme];
223
215
}
0 commit comments