@@ -302,4 +302,55 @@ - (void)setButtonLabelHorizontalLayout:(BOOL)horizontal animated:(BOOL)animated
302
302
}];
303
303
}
304
304
}
305
+
306
+ #pragma mark - Null Resettable Accessors -
307
+ - (void )setKeypadButtonForegroundColor : (nullable UIColor *)keypadButtonForegroundColor
308
+ {
309
+ if (keypadButtonForegroundColor == _keypadButtonForegroundColor) { return ; }
310
+ _keypadButtonForegroundColor = keypadButtonForegroundColor;
311
+
312
+ if (_keypadButtonForegroundColor == nil ) {
313
+ BOOL isDark = self.style == TOPasscodeSettingsViewStyleDark;
314
+ _keypadButtonForegroundColor = isDark ? [UIColor colorWithWhite: 0 .3f alpha: 1 .0f ] : [UIColor whiteColor ];
315
+ }
316
+
317
+ self.buttonBackgroundImage = nil ;
318
+ [self setNeedsLayout ];
319
+ }
320
+
321
+ - (void )setKeypadButtonBorderColor : (nullable UIColor *)keypadButtonBorderColor
322
+ {
323
+ if (keypadButtonBorderColor == _keypadButtonBorderColor) { return ; }
324
+ _keypadButtonBorderColor = keypadButtonBorderColor;
325
+
326
+ if (_keypadButtonBorderColor == nil ) {
327
+ BOOL isDark = self.style == TOPasscodeSettingsViewStyleDark;
328
+ UIColor *borderColor = nil ;
329
+ if (isDark) {
330
+ borderColor = [UIColor colorWithWhite: 0.2 alpha: 1 .0f ];
331
+ }
332
+ else {
333
+ borderColor = [UIColor colorWithRed: 166 .0f /255 .0f green: 174 .0f /255 .0f blue: 186 .0f /255 .0f alpha: 1 .0f ];
334
+ }
335
+ _keypadButtonBorderColor = borderColor;
336
+ }
337
+
338
+ self.buttonBackgroundImage = nil ;
339
+ [self setNeedsLayout ];
340
+ }
341
+
342
+ - (void )setKeypadButtonTappedForegroundColor : (nullable UIColor *)keypadButtonTappedForegroundColor
343
+ {
344
+ if (keypadButtonTappedForegroundColor == _keypadButtonTappedForegroundColor) { return ; }
345
+ _keypadButtonTappedForegroundColor = keypadButtonTappedForegroundColor;
346
+
347
+ if (_keypadButtonTappedForegroundColor == nil ) {
348
+ BOOL isDark = self.style == TOPasscodeSettingsViewStyleDark;
349
+ _keypadButtonTappedForegroundColor = isDark ? [UIColor colorWithWhite: 0 .4f alpha: 1 .0f ] : [UIColor colorWithWhite: 0 .85f alpha: 1 .0f ];
350
+ }
351
+
352
+ self.buttonTappedBackgroundImage = nil ;
353
+ [self setNeedsLayout ];
354
+ }
355
+
305
356
@end
0 commit comments