[ios] Review fixes (night mode).

This commit is contained in:
VladiMihaylenko 2016-01-11 17:38:49 +03:00 committed by Constantin Shalnev
parent c39124971c
commit da35b25e98
4 changed files with 5 additions and 18 deletions

View file

@ -225,9 +225,7 @@
- (void)refresh
{
[super refresh];
UIColor * opposite = self.selectedBackgroundView.backgroundColor.opposite;
if (opposite)
self.selectedBackgroundView.backgroundColor = opposite;
[self.selectedBackgroundView refresh];
}
@end
@ -305,11 +303,9 @@
- (void)refresh
{
UIColor * oppositeBackground = self.backgroundColor.opposite;
[super refresh];
UIColor * oppositeText = self.textColor.opposite;
UIColor * oppositeTint = self.tintColor.opposite;
if (oppositeBackground)
self.backgroundColor = oppositeBackground;
if (oppositeText)
self.textColor = oppositeText;
if (oppositeTint)
@ -322,14 +318,12 @@
- (void)refresh
{
[super refresh];
UIColor * oppositeText = self.textColor.opposite;
UIColor * oppositeBackground = self.backgroundColor.opposite;
UILabel * placeholder = [self valueForKey:@"_placeholderLabel"];
UIColor * oppositePlaceholder = placeholder.textColor.opposite;
if (oppositeText)
self.textColor = oppositeText;
if (oppositeBackground)
self.backgroundColor = oppositeBackground;
if (oppositePlaceholder)
placeholder.textColor = oppositePlaceholder;
}

View file

@ -19,8 +19,6 @@
- (instancetype)init __attribute__((unavailable("init is not available")));
- (instancetype)initWithParentController:(MapViewController *)controller;
- (void)onEnterForeground;
#pragma mark - Layout
- (void)refreshLayout;

View file

@ -392,11 +392,6 @@ typedef NS_ENUM(NSUInteger, UserTouchesAction)
return;
// Notify about entering foreground (should be called on the first launch too).
GetFramework().EnterForeground();
if (self.isViewLoaded && self.view.window)
{
[self.controlsManager onEnterForeground];
}
}
- (void)viewWillAppear:(BOOL)animated

View file

@ -41,10 +41,10 @@ NSDictionary<NSString *, UIColor *> * night =
@"blackSecondaryText" : [UIColor colorWithWhite:1. alpha:alpha70],
@"blackHintText" : [UIColor colorWithWhite:1. alpha:alpha30],
@"blackDividers" : [UIColor colorWithWhite:1. alpha:alpha12],
@"white" : [UIColor colorWithRed:scaled(60) green:scaled(64) blue:scaled(68) alpha:alpha100],
@"white" : [UIColor colorWithRed:scaled(60.) green:scaled(64.) blue:scaled(68.) alpha:alpha100],
@"whiteSecondaryText" : [UIColor colorWithWhite:1. alpha:alpha70],
@"buttonDisabledBlueText" : [UIColor colorWithRed:scaled(255.) green:scaled(230.) blue:scaled(140.) alpha:alpha30],
@"alertBackground" : [UIColor colorWithRed:scaled(60) green:scaled(64) blue:68 alpha:alpha100]
@"alertBackground" : [UIColor colorWithRed:scaled(60.) green:scaled(64.) blue:scaled(68.) alpha:alpha100]
};
NSDictionary<NSString *, UIColor *> * day =