Skip to content

Commit 284f82b

Browse files
committed
Always use dark color for text field tint
1 parent adb4f83 commit 284f82b

File tree

4 files changed

+6
-5
lines changed

4 files changed

+6
-5
lines changed

Authenticator/Classes/OTPTextFieldCell.m

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ - (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reus
4343
self.textField = [UITextField new];
4444
self.textField.borderStyle = UITextBorderStyleRoundedRect;
4545
self.textField.font = [UIFont fontWithName:@"HelveticaNeue-Light" size:16];
46-
self.textField.backgroundColor = [UIColor otpLightColor];
4746
[self.contentView addSubview:self.textField];
4847
}
4948
return self;

Authenticator/Classes/OTPTokenEntryViewController.m

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,8 @@ - (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)ce
199199

200200
cell.textLabel.textColor = [UIColor otpForegroundColor];
201201
if ([cell isKindOfClass:[OTPTextFieldCell class]]) {
202-
((OTPTextFieldCell *)cell).textField.tintColor = [UIColor otpBackgroundColor];
202+
((OTPTextFieldCell *)cell).textField.backgroundColor = [UIColor otpLightColor];
203+
((OTPTextFieldCell *)cell).textField.tintColor = [UIColor otpDarkColor];
203204
}
204205
}
205206

Authenticator/Classes/UIColor+OTP.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727

2828
@interface UIColor (OTP)
2929

30+
+ (instancetype)otpDarkColor;
3031
+ (instancetype)otpLightColor;
3132

3233
+ (instancetype)otpBarBackgroundColor;

Authenticator/Classes/UIColor+OTP.m

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,12 @@
2828

2929
@implementation UIColor (OTP)
3030

31-
COLOR(darkBlueColor, [UIColor colorWithIntegerRed:35 green:35 blue:50])
31+
COLOR(otpDarkColor, [UIColor colorWithIntegerRed:35 green:35 blue:50 ])
3232
COLOR(otpLightColor, [UIColor colorWithIntegerRed:250 green:248 blue:240])
3333

34-
COLOR(otpBarBackgroundColor, [UIColor darkBlueColor])
34+
COLOR(otpBarBackgroundColor, [UIColor otpDarkColor])
3535
COLOR(otpBarForegroundColor, [UIColor otpLightColor])
36-
COLOR(otpBackgroundColor, [UIColor darkBlueColor])
36+
COLOR(otpBackgroundColor, [UIColor otpDarkColor])
3737
COLOR(otpForegroundColor, [UIColor otpLightColor])
3838

3939
@end

0 commit comments

Comments
 (0)