diff --git a/iphone/Maps/ActiveMapsVC.mm b/iphone/Maps/ActiveMapsVC.mm index 638b87077c..f61bdb0ce7 100644 --- a/iphone/Maps/ActiveMapsVC.mm +++ b/iphone/Maps/ActiveMapsVC.mm @@ -3,6 +3,7 @@ #import "Common.h" #import "MapCell.h" #import "Statistics.h" +#import "UIColor+MapsMeColor.h" extern NSString * const MapsStatusChangedNotification; @@ -191,6 +192,7 @@ extern NSString * const MapsStatusChangedNotification; UILabel * label = [[UILabel alloc] initWithFrame:view.bounds]; label.font = [UIFont fontWithName:@"HelveticaNeue" size:13]; label.backgroundColor = [UIColor clearColor]; + label.textColor = [UIColor blackPrimaryText]; if (group == ActiveMapsLayout::TGroup::EOutOfDate) label.text = L(@"downloader_outdated_maps").uppercaseString; diff --git a/iphone/Maps/Categories/UIKitCategories.h b/iphone/Maps/Categories/UIKitCategories.h index a9e2c041cc..baa195220d 100644 --- a/iphone/Maps/Categories/UIKitCategories.h +++ b/iphone/Maps/Categories/UIKitCategories.h @@ -27,16 +27,6 @@ static inline CGFloat LengthCGPoint(CGPoint point) @end - -@interface UIColor (HexColor) - -+ (UIColor *)colorWithColorCode:(NSString *)colorCode; -+ (UIColor *)applicationBackgroundColor; -+ (UIColor *)applicationColor; -+ (UIColor *)navigationBarColor; - -@end - @interface UIView (Coordinates) @property (nonatomic) CGFloat minX; diff --git a/iphone/Maps/Categories/UIKitCategories.mm b/iphone/Maps/Categories/UIKitCategories.mm index 9bbd8b5601..2e6d60f7f2 100644 --- a/iphone/Maps/Categories/UIKitCategories.mm +++ b/iphone/Maps/Categories/UIKitCategories.mm @@ -20,43 +20,6 @@ @end -@implementation UIColor (HexColor) - -+ (UIColor *)colorWithColorCode:(NSString *)hexString -{ - NSString * cleanString = [hexString stringByReplacingOccurrencesOfString:@"#" withString:@""]; - - if (cleanString.length == 6) - cleanString = [cleanString stringByAppendingString:@"ff"]; - - unsigned int baseValue; - [[NSScanner scannerWithString:cleanString] scanHexInt:&baseValue]; - - float red = ((baseValue >> 24) & 0xFF) / 255.f; - float green = ((baseValue >> 16) & 0xFF) / 255.f; - float blue = ((baseValue >> 8) & 0xFF) / 255.f; - float alpha = ((baseValue >> 0) & 0xFF) / 255.f; - - return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; -} - -+ (UIColor *)applicationBackgroundColor -{ - return [UIColor colorWithColorCode:@"efeff4"]; -} - -+ (UIColor *)applicationColor -{ - return [UIColor colorWithColorCode:@"15c783"]; -} - -+ (UIColor *)navigationBarColor -{ - return [UIColor colorWithColorCode:@"1F9952"]; -} - -@end - @implementation UIView (Coordinates) - (void)setMidX:(CGFloat)midX diff --git a/iphone/Maps/Classes/CustomAlert/DownloadTransitMapsAlert/MWMDownloadTransitMapAlert.mm b/iphone/Maps/Classes/CustomAlert/DownloadTransitMapsAlert/MWMDownloadTransitMapAlert.mm index 1661eeaf66..0096219191 100644 --- a/iphone/Maps/Classes/CustomAlert/DownloadTransitMapsAlert/MWMDownloadTransitMapAlert.mm +++ b/iphone/Maps/Classes/CustomAlert/DownloadTransitMapsAlert/MWMDownloadTransitMapAlert.mm @@ -365,7 +365,7 @@ static NSString * const kStatisticsEvent = @"Map download Alert"; - (UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section { UIView * view = [[UIView alloc] init]; - view.backgroundColor = self.missedFiles.count == 2 && section == 0 ? UIColor.blackDividers : [UIColor colorWithWhite:0. alpha:0.06]; + view.backgroundColor = self.missedFiles.count == 2 && section == 0 ? UIColor.blackDividers : UIColor.blackOpaque; return view; } diff --git a/iphone/Maps/Classes/CustomAlert/DownloadTransitMapsAlert/MWMDownloadTransitMapAlert.xib b/iphone/Maps/Classes/CustomAlert/DownloadTransitMapsAlert/MWMDownloadTransitMapAlert.xib index ea1c514e68..16f462c736 100644 --- a/iphone/Maps/Classes/CustomAlert/DownloadTransitMapsAlert/MWMDownloadTransitMapAlert.xib +++ b/iphone/Maps/Classes/CustomAlert/DownloadTransitMapsAlert/MWMDownloadTransitMapAlert.xib @@ -1,8 +1,8 @@ - + - + @@ -22,7 +22,6 @@ - @@ -66,16 +65,17 @@ - + + + - + + + - @@ -164,7 +164,6 @@ - diff --git a/iphone/Maps/Classes/CustomAlert/DownloadTransitMapsAlert/MWMDownloaderDialogCell.xib b/iphone/Maps/Classes/CustomAlert/DownloadTransitMapsAlert/MWMDownloaderDialogCell.xib index df8daccd58..2f3c5cec7f 100644 --- a/iphone/Maps/Classes/CustomAlert/DownloadTransitMapsAlert/MWMDownloaderDialogCell.xib +++ b/iphone/Maps/Classes/CustomAlert/DownloadTransitMapsAlert/MWMDownloaderDialogCell.xib @@ -1,8 +1,8 @@ - + - + @@ -16,16 +16,17 @@ - @@ -33,9 +34,14 @@ + + + - + + + diff --git a/iphone/Maps/Classes/CustomAlert/DownloadTransitMapsAlert/MWMDownloaderDialogHeader.xib b/iphone/Maps/Classes/CustomAlert/DownloadTransitMapsAlert/MWMDownloaderDialogHeader.xib index 18c448f0b7..b206fb771d 100644 --- a/iphone/Maps/Classes/CustomAlert/DownloadTransitMapsAlert/MWMDownloaderDialogHeader.xib +++ b/iphone/Maps/Classes/CustomAlert/DownloadTransitMapsAlert/MWMDownloaderDialogHeader.xib @@ -1,8 +1,8 @@ - + - + @@ -13,7 +13,6 @@ - @@ -32,15 +33,16 @@ - @@ -79,6 +82,9 @@ + + + diff --git a/iphone/Maps/Classes/CustomViews/CircularProgress/MWMCircularProgressView.mm b/iphone/Maps/Classes/CustomViews/CircularProgress/MWMCircularProgressView.mm index 88987b8a76..a489ebe686 100644 --- a/iphone/Maps/Classes/CustomViews/CircularProgress/MWMCircularProgressView.mm +++ b/iphone/Maps/Classes/CustomViews/CircularProgress/MWMCircularProgressView.mm @@ -60,12 +60,17 @@ static inline CGFloat angleWithProgress(CGFloat progress) [self setColor:clearColor forState:MWMCircularProgressStateCompleted]; } +- (void)refresh +{ + [self setupColors]; +} + - (void)setupAnimationLayers { self.backgroundLayer = [CAShapeLayer layer]; self.progressLayer = [CAShapeLayer layer]; - [self refresh]; + [self refreshProgress]; [self.layer addSublayer:self.backgroundLayer]; [self.layer addSublayer:self.progressLayer]; } @@ -73,18 +78,18 @@ static inline CGFloat angleWithProgress(CGFloat progress) - (void)setImage:(nonnull UIImage *)image forState:(MWMCircularProgressState)state { self.images[@(state)] = image; - [self refresh]; + [self refreshProgress]; } - (void)setColor:(nonnull UIColor *)color forState:(MWMCircularProgressState)state { self.colors[@(state)] = color; - [self refresh]; + [self refreshProgress]; } #pragma mark - Progress -- (void)refresh +- (void)refreshProgress { self.backgroundLayer.fillColor = self.progressLayer.fillColor = UIColor.clearColor.CGColor; self.backgroundLayer.lineWidth = self.progressLayer.lineWidth = kLineWidth; @@ -193,7 +198,7 @@ static inline CGFloat angleWithProgress(CGFloat progress) if (_state == state) return; _state = state; - [self refresh]; + [self refreshProgress]; } - (CGColorRef)backgroundColor @@ -215,10 +220,10 @@ static inline CGFloat angleWithProgress(CGFloat progress) - (void)setFrame:(CGRect)frame { - BOOL const needRefresh = !CGRectEqualToRect(self.frame, frame); + BOOL const needrefreshProgress = !CGRectEqualToRect(self.frame, frame); super.frame = frame; - if (needRefresh) - [self refresh]; + if (needrefreshProgress) + [self refreshProgress]; } - (BOOL)animating diff --git a/iphone/Maps/Classes/CustomViews/MapViewControls/MWMMapViewControlsManager.mm b/iphone/Maps/Classes/CustomViews/MapViewControls/MWMMapViewControlsManager.mm index 54d492c072..1bd74c2524 100644 --- a/iphone/Maps/Classes/CustomViews/MapViewControls/MWMMapViewControlsManager.mm +++ b/iphone/Maps/Classes/CustomViews/MapViewControls/MWMMapViewControlsManager.mm @@ -463,8 +463,14 @@ extern NSString * const kAlohalyticsTapEventKey; GetFramework().FollowRoute(); self.disableStandbyOnRouteFollowing = YES; [self.menuController setStreetName:@""]; - MapsAppDelegate.theApp.routingPlaneMode = MWMRoutingPlaneModeNone; + MapsAppDelegate * app = MapsAppDelegate.theApp; + app.routingPlaneMode = MWMRoutingPlaneModeNone; [RouteState save]; + if ([MapsAppDelegate isAutoNightMode]) + { + [MapsAppDelegate changeMapStyleIfNedeed]; + [app startMapStyleChecker]; + } return YES; } @@ -473,13 +479,14 @@ extern NSString * const kAlohalyticsTapEventKey; [[Statistics instance] logEvent:kStatEventName(kStatPointToPoint, kStatClose)]; [[MapsAppDelegate theApp].m_locationManager stop:self.navigationManager]; self.navigationManager.state = MWMNavigationDashboardStateHidden; - GetFramework().CloseRouting(); self.disableStandbyOnRouteFollowing = NO; [MapsAppDelegate theApp].routingPlaneMode = MWMRoutingPlaneModeNone; [RouteState remove]; [self.menuController setInactive]; [self resetRoutingPoint]; [self navigationDashBoardDidUpdate]; + [MapsAppDelegate resetToDefaultMapStyle]; + GetFramework().CloseRouting(); } - (void)swapPointsAndRebuildRouteIfPossible diff --git a/iphone/Maps/Classes/CustomViews/MapViewControls/Search/TableView/MWMSearchTableViewController.xib b/iphone/Maps/Classes/CustomViews/MapViewControls/Search/TableView/MWMSearchTableViewController.xib index e9d4db77ee..23307d76af 100644 --- a/iphone/Maps/Classes/CustomViews/MapViewControls/Search/TableView/MWMSearchTableViewController.xib +++ b/iphone/Maps/Classes/CustomViews/MapViewControls/Search/TableView/MWMSearchTableViewController.xib @@ -18,7 +18,7 @@ - + diff --git a/iphone/Maps/Classes/CustomViews/NavigationDashboard/MWMNavigationDashboardManager.mm b/iphone/Maps/Classes/CustomViews/NavigationDashboard/MWMNavigationDashboardManager.mm index a039d23c3c..ffc2b3995d 100644 --- a/iphone/Maps/Classes/CustomViews/NavigationDashboard/MWMNavigationDashboardManager.mm +++ b/iphone/Maps/Classes/CustomViews/NavigationDashboard/MWMNavigationDashboardManager.mm @@ -375,7 +375,8 @@ extern NSString * const kTTSStatusWasChangedNotification; - (void)refresh { - [self.navigationDashboard refresh]; + [self.navigationDashboardLandscape refresh]; + [self.navigationDashboardPortrait refresh]; [self.routePreview refresh]; } diff --git a/iphone/Maps/Classes/CustomViews/NavigationDashboard/Views/Dashboard/MWMLandscapeNavigationDashboard.xib b/iphone/Maps/Classes/CustomViews/NavigationDashboard/Views/Dashboard/MWMLandscapeNavigationDashboard.xib index 15e844c38d..a6940788b7 100644 --- a/iphone/Maps/Classes/CustomViews/NavigationDashboard/Views/Dashboard/MWMLandscapeNavigationDashboard.xib +++ b/iphone/Maps/Classes/CustomViews/NavigationDashboard/Views/Dashboard/MWMLandscapeNavigationDashboard.xib @@ -162,7 +162,7 @@ - + diff --git a/iphone/Maps/Classes/CustomViews/NavigationDashboard/Views/Dashboard/MWMNavigationDashboard.mm b/iphone/Maps/Classes/CustomViews/NavigationDashboard/Views/Dashboard/MWMNavigationDashboard.mm index 8e5224880f..f36083611a 100644 --- a/iphone/Maps/Classes/CustomViews/NavigationDashboard/Views/Dashboard/MWMNavigationDashboard.mm +++ b/iphone/Maps/Classes/CustomViews/NavigationDashboard/Views/Dashboard/MWMNavigationDashboard.mm @@ -28,7 +28,7 @@ if (IPAD) self.statusbarBackground = nil; [self.progress setThumbImage:[UIImage imageNamed:@"progress_circle_light"] forState:UIControlStateNormal]; - [self.progress setMaximumTrackTintColor:[UIColor colorWithWhite:0. alpha:0.08]]; + [self.progress setMaximumTrackTintColor:[UIColor blackOpaque]]; [self.progress setMinimumTrackTintColor:[UIColor blackSecondaryText]]; CALayer * l = self.layer; l.shouldRasterize = YES; diff --git a/iphone/Maps/Classes/CustomViews/NavigationDashboard/Views/Dashboard/MWMNiPadNavigationDashboard.xib b/iphone/Maps/Classes/CustomViews/NavigationDashboard/Views/Dashboard/MWMNiPadNavigationDashboard.xib index adae784ad5..2df30cb775 100644 --- a/iphone/Maps/Classes/CustomViews/NavigationDashboard/Views/Dashboard/MWMNiPadNavigationDashboard.xib +++ b/iphone/Maps/Classes/CustomViews/NavigationDashboard/Views/Dashboard/MWMNiPadNavigationDashboard.xib @@ -241,6 +241,6 @@ - + diff --git a/iphone/Maps/Classes/MWMPlacePageViewManager.mm b/iphone/Maps/Classes/MWMPlacePageViewManager.mm index 6034f11a01..07eeb9cf5e 100644 --- a/iphone/Maps/Classes/MWMPlacePageViewManager.mm +++ b/iphone/Maps/Classes/MWMPlacePageViewManager.mm @@ -146,6 +146,7 @@ typedef NS_ENUM(NSUInteger, MWMPlacePageManagerState) - (void)refresh { [self.placePage.extendedPlacePageView refresh]; + [self.placePage.actionBar refresh]; } - (void)setPlacePageForiPad diff --git a/iphone/Maps/Classes/MapCell.mm b/iphone/Maps/Classes/MapCell.mm index b2d96fdda7..90067dafe1 100644 --- a/iphone/Maps/Classes/MapCell.mm +++ b/iphone/Maps/Classes/MapCell.mm @@ -2,6 +2,7 @@ #import "MapCell.h" #import "UIColor+MapsMeColor.h" #import "UIFont+MapsMeFonts.h" +#import "UIImageView+Coloring.h" @interface MapCell () @@ -46,9 +47,9 @@ self.progressView.failedMode = NO; if (options == MapOptions::Map) - self.routingImageView.image = [UIImage imageNamed:@"DownloadRoutingButton"]; + self.routingImageView.mwm_name = @"ic_routing_get"; else - self.routingImageView.image = [UIImage imageNamed:@"RoutingDownloadedButton"]; + self.routingImageView.mwm_name = @"ic_routing_ok"; switch (status) { @@ -59,13 +60,13 @@ else self.statusLabel.text = L(@"downloader_status_outdated").uppercaseString; - self.statusLabel.textColor = [UIColor colorWithColorCode:@"179E4D"]; + self.statusLabel.textColor = [UIColor linkBlue]; [self setProgressMode:NO withAnimatedLayout:animated]; break; case TStatus::EInQueue: case TStatus::EDownloading: - self.statusLabel.textColor = [UIColor colorWithColorCode:@"999999"]; + self.statusLabel.textColor = [UIColor blackHintText]; [self setDownloadProgress:self.downloadProgress animated:animated]; if (status == TStatus::EInQueue) self.statusLabel.text = L(@"downloader_queued").uppercaseString; @@ -74,7 +75,7 @@ case TStatus::EOnDisk: { self.statusLabel.text = L(@"downloader_downloaded").uppercaseString; - self.statusLabel.textColor = [UIColor colorWithColorCode:@"999999"]; + self.statusLabel.textColor = [UIColor blackHintText]; if (animated) { [self alignSubviews]; @@ -93,7 +94,7 @@ case TStatus::EDownloadFailed: self.progressView.failedMode = YES; self.statusLabel.text = L(@"downloader_retry").uppercaseString; - self.statusLabel.textColor = [UIColor colorWithColorCode:@"FF4436"]; + self.statusLabel.textColor = [UIColor red]; [self setProgressMode:YES withAnimatedLayout:animated]; break; @@ -156,7 +157,7 @@ CGFloat const sizeLabelMinY = self.statusLabel.maxY; self.sizeLabel.frame = CGRectMake(self.contentView.width - [self rightOffset] - self.sizeLabel.width, sizeLabelMinY, self.sizeLabel.width, 16); - self.sizeLabel.textColor = [UIColor colorWithColorCode:@"999999"]; + self.sizeLabel.textColor = [UIColor blackHintText]; self.sizeLabel.hidden = self.parentMode; CGFloat const rightLabelsMaxWidth = self.parentMode ? 10 : MAX(self.statusLabel.width, self.sizeLabel.width); @@ -270,7 +271,7 @@ { _titleLabel = [[UILabel alloc] initWithFrame:CGRectZero]; _titleLabel.backgroundColor = [UIColor clearColor]; - _titleLabel.textColor = [UIColor blackColor]; + _titleLabel.textColor = [UIColor blackPrimaryText]; _titleLabel.font = [UIFont regular17]; } return _titleLabel; @@ -315,7 +316,10 @@ - (UIImageView *)routingImageView { if (!_routingImageView) - _routingImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"DownloadRoutingButton"]]; + { + _routingImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"ic_routing_get_light"]]; + _routingImageView.mwm_name = @"ic_routing_get"; + } return _routingImageView; } diff --git a/iphone/Maps/Classes/MapViewController.mm b/iphone/Maps/Classes/MapViewController.mm index 5cd45bc86b..8c457ce376 100644 --- a/iphone/Maps/Classes/MapViewController.mm +++ b/iphone/Maps/Classes/MapViewController.mm @@ -36,7 +36,6 @@ extern NSString * const kAlohalyticsTapEventKey = @"$onClick"; extern NSString * const kUDWhatsNewWasShown = @"WhatsNewWith3dAndPerspectiveWasShown"; -extern NSString * const kUDAutoNightMode; extern char const * kAdForbiddenSettingsKey; extern char const * kAdServerForbiddenKey; @@ -143,12 +142,6 @@ typedef NS_ENUM(NSUInteger, UserTouchesAction) [self showPopover]; [self updateRoutingInfo]; - static dispatch_once_t onceToken = 0; - dispatch_once(&onceToken, ^ - { - if ([[NSUserDefaults standardUserDefaults] boolForKey:kUDAutoNightMode]) - [MapsAppDelegate.theApp changeMapStyleIfNedeed]; - }); if (self.forceRoutingStateChange == ForceRoutingStateChangeRestoreRoute) [self restoreRoute]; } @@ -423,6 +416,7 @@ typedef NS_ENUM(NSUInteger, UserTouchesAction) - (void)refresh { // [super refresh]; + [MapsAppDelegate customizeAppearance]; [self.controlsManager refresh]; } diff --git a/iphone/Maps/Classes/MapsAppDelegate.h b/iphone/Maps/Classes/MapsAppDelegate.h index 2a900b41b0..f26177164a 100644 --- a/iphone/Maps/Classes/MapsAppDelegate.h +++ b/iphone/Maps/Classes/MapsAppDelegate.h @@ -39,9 +39,12 @@ typedef NS_ENUM(NSUInteger, MWMRoutingPlaneMode) - (void)enableDownloadIndicator; - (void)showMap; -- (void)changeMapStyleIfNedeed; - (void)startMapStyleChecker; - (void)stopMapStyleChecker; ++ (void)setAutoNightModeOn:(BOOL)on; ++ (BOOL)isAutoNightMode; ++ (void)resetToDefaultMapStyle; ++ (void)changeMapStyleIfNedeed; - (void)setMapStyle:(MapStyle)mapStyle; diff --git a/iphone/Maps/Classes/MapsAppDelegate.mm b/iphone/Maps/Classes/MapsAppDelegate.mm index 13238cb338..78789d8946 100644 --- a/iphone/Maps/Classes/MapsAppDelegate.mm +++ b/iphone/Maps/Classes/MapsAppDelegate.mm @@ -249,37 +249,62 @@ void InitLocalizedStrings() - (void)determineMapStyle { - [UIColor setNightMode:GetFramework().GetMapStyle() == MapStyleDark]; - if ([[NSUserDefaults standardUserDefaults] boolForKey:kUDAutoNightMode]) + GetFramework().SetMapStyle(MapStyleClear); + [UIColor setNightMode:NO]; + if ([MapsAppDelegate isAutoNightMode]) [self startMapStyleChecker]; } ++ (void)setAutoNightModeOn:(BOOL)on +{ + NSUserDefaults * ud = [NSUserDefaults standardUserDefaults]; + [ud setBool:on forKey:kUDAutoNightMode]; + [ud synchronize]; +} + ++ (BOOL)isAutoNightMode +{ + return [[NSUserDefaults standardUserDefaults] boolForKey:kUDAutoNightMode]; +} + - (void)startMapStyleChecker { - NSUserDefaults * ud = [NSUserDefaults standardUserDefaults]; - [ud setBool:YES forKey:kUDAutoNightMode]; - [ud synchronize]; - self.mapStyleSwitchTimer = [NSTimer scheduledTimerWithTimeInterval:(30 * 60 * 60) target:self selector:@selector(changeMapStyleIfNedeed) userInfo:nil repeats:YES]; + NSAssert([MapsAppDelegate isAutoNightMode], @"Invalid auto switcher's state"); + self.mapStyleSwitchTimer = [NSTimer scheduledTimerWithTimeInterval:(1 * 60) target:[MapsAppDelegate class] + selector:@selector(changeMapStyleIfNedeed) userInfo:nil + repeats:YES]; } - (void)stopMapStyleChecker { - NSUserDefaults * ud = [NSUserDefaults standardUserDefaults]; - [ud setBool:NO forKey:kUDAutoNightMode]; - [ud synchronize]; [self.mapStyleSwitchTimer invalidate]; } -- (void)changeMapStyleIfNedeed ++ (void)resetToDefaultMapStyle { - CLLocation * l = self.m_locationManager.lastLocation; - if (!l) + MapsAppDelegate * app = MapsAppDelegate.theApp; + auto & f = GetFramework(); + auto style = f.GetMapStyle(); + if (style == MapStyleClear || style == MapStyleLight) return; - auto const dayTime = GetDayTime(static_cast(NSDate.date.timeIntervalSince1970), l.coordinate.latitude, l.coordinate.longitude); - dispatch_async(dispatch_get_main_queue(), ^ + f.SetMapStyle(MapStyleClear); + [UIColor setNightMode:NO]; + [static_cast(app.mapViewController.navigationController.topViewController) refresh]; + [app stopMapStyleChecker]; +} + ++ (void)changeMapStyleIfNedeed +{ + NSAssert([MapsAppDelegate isAutoNightMode], @"Invalid auto switcher's state"); + auto & f = GetFramework(); + MapsAppDelegate * app = MapsAppDelegate.theApp; + CLLocation * l = app.m_locationManager.lastLocation; + if (!l || !f.IsRoutingActive()) + return; + dispatch_async(dispatch_get_main_queue(), [&f, l, self, app] { - auto & f = GetFramework(); - ViewController * vc = static_cast(self.mapViewController.navigationController.topViewController); + auto const dayTime = GetDayTime(static_cast(NSDate.date.timeIntervalSince1970), l.coordinate.latitude, l.coordinate.longitude); + ViewController * vc = static_cast(app.mapViewController.navigationController.topViewController); auto style = f.GetMapStyle(); switch (dayTime) { diff --git a/iphone/Maps/Classes/ToastView.mm b/iphone/Maps/Classes/ToastView.mm index f3f673eb0f..a2178c8610 100644 --- a/iphone/Maps/Classes/ToastView.mm +++ b/iphone/Maps/Classes/ToastView.mm @@ -1,5 +1,5 @@ - #import "ToastView.h" +#import "UIColor+MapsMeColor.h" @interface ToastView () @@ -17,7 +17,7 @@ CGSize textSize = [message sizeWithDrawSize:CGSizeMake(245 - 2 * xOffset, 1000) font:self.messageLabel.font]; self = [super initWithFrame:CGRectMake(0, 0, textSize.width + 2 * xOffset, textSize.height + 2 * yOffset)]; - self.backgroundColor = [UIColor colorWithColorCode:@"f2f2f2"]; + self.backgroundColor = [UIColor pressBackground]; self.layer.cornerRadius = 4; self.layer.masksToBounds = NO; self.autoresizingMask = UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleRightMargin | UIViewAutoresizingFlexibleTopMargin; @@ -39,7 +39,7 @@ _messageLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, 0, 0)]; _messageLabel.font = [UIFont fontWithName:@"HelveticaNeue" size:12.5]; _messageLabel.textAlignment = NSTextAlignmentCenter; - _messageLabel.textColor = [UIColor blackColor]; + _messageLabel.textColor = [UIColor blackPrimaryText]; _messageLabel.numberOfLines = 0; _messageLabel.lineBreakMode = NSLineBreakByWordWrapping; } diff --git a/iphone/Maps/Images.xcassets/Downloader/Badge.imageset/Badge.png b/iphone/Maps/Images.xcassets/Downloader/Badge.imageset/Badge.png index 819b5a54b5..b8cb85b138 100644 Binary files a/iphone/Maps/Images.xcassets/Downloader/Badge.imageset/Badge.png and b/iphone/Maps/Images.xcassets/Downloader/Badge.imageset/Badge.png differ diff --git a/iphone/Maps/Images.xcassets/Downloader/Badge.imageset/Badge@2x.png b/iphone/Maps/Images.xcassets/Downloader/Badge.imageset/Badge@2x.png index 5062d4f10c..21918b36a1 100644 Binary files a/iphone/Maps/Images.xcassets/Downloader/Badge.imageset/Badge@2x.png and b/iphone/Maps/Images.xcassets/Downloader/Badge.imageset/Badge@2x.png differ diff --git a/iphone/Maps/Images.xcassets/Downloader/Badge.imageset/Badge@3x.png b/iphone/Maps/Images.xcassets/Downloader/Badge.imageset/Badge@3x.png index ca25094030..902a7fd8cb 100644 Binary files a/iphone/Maps/Images.xcassets/Downloader/Badge.imageset/Badge@3x.png and b/iphone/Maps/Images.xcassets/Downloader/Badge.imageset/Badge@3x.png differ diff --git a/iphone/Maps/Images.xcassets/Downloader/Badge.imageset/Contents.json b/iphone/Maps/Images.xcassets/Downloader/Badge.imageset/Contents.json index 840b60bb6e..bebcff9bda 100644 --- a/iphone/Maps/Images.xcassets/Downloader/Badge.imageset/Contents.json +++ b/iphone/Maps/Images.xcassets/Downloader/Badge.imageset/Contents.json @@ -2,18 +2,18 @@ "images" : [ { "idiom" : "universal", - "scale" : "1x", - "filename" : "Badge.png" + "filename" : "Badge.png", + "scale" : "1x" }, { "idiom" : "universal", - "scale" : "2x", - "filename" : "Badge@2x.png" + "filename" : "Badge@2x.png", + "scale" : "2x" }, { "idiom" : "universal", - "scale" : "3x", - "filename" : "Badge@3x.png" + "filename" : "Badge@3x.png", + "scale" : "3x" } ], "info" : { diff --git a/iphone/Maps/Images.xcassets/Downloader/DownloadRoutingButton.imageset/routing_get_mdpi.png b/iphone/Maps/Images.xcassets/Downloader/DownloadRoutingButton.imageset/routing_get_mdpi.png deleted file mode 100644 index 43724752b5..0000000000 Binary files a/iphone/Maps/Images.xcassets/Downloader/DownloadRoutingButton.imageset/routing_get_mdpi.png and /dev/null differ diff --git a/iphone/Maps/Images.xcassets/Downloader/DownloadRoutingButton.imageset/routing_get_xhdpi.png b/iphone/Maps/Images.xcassets/Downloader/DownloadRoutingButton.imageset/routing_get_xhdpi.png deleted file mode 100644 index e8ddb8bfa4..0000000000 Binary files a/iphone/Maps/Images.xcassets/Downloader/DownloadRoutingButton.imageset/routing_get_xhdpi.png and /dev/null differ diff --git a/iphone/Maps/Images.xcassets/Downloader/DownloadRoutingButton.imageset/routing_get_xxhdpi.png b/iphone/Maps/Images.xcassets/Downloader/DownloadRoutingButton.imageset/routing_get_xxhdpi.png deleted file mode 100644 index 0d6915dab2..0000000000 Binary files a/iphone/Maps/Images.xcassets/Downloader/DownloadRoutingButton.imageset/routing_get_xxhdpi.png and /dev/null differ diff --git a/iphone/Maps/Images.xcassets/Downloader/ProgressTriangle.imageset/Contents.json b/iphone/Maps/Images.xcassets/Downloader/ProgressTriangle.imageset/Contents.json index 8b3fa3e01d..9275fc185a 100644 --- a/iphone/Maps/Images.xcassets/Downloader/ProgressTriangle.imageset/Contents.json +++ b/iphone/Maps/Images.xcassets/Downloader/ProgressTriangle.imageset/Contents.json @@ -2,18 +2,18 @@ "images" : [ { "idiom" : "universal", - "scale" : "1x", - "filename" : "ProgressTriangle.png" + "filename" : "ProgressTriangle.png", + "scale" : "1x" }, { "idiom" : "universal", - "scale" : "2x", - "filename" : "ProgressTriangle@2x.png" + "filename" : "ProgressTriangle@2x.png", + "scale" : "2x" }, { "idiom" : "universal", - "scale" : "3x", - "filename" : "ProgressTriangle@3x.png" + "filename" : "ProgressTriangle@3x.png", + "scale" : "3x" } ], "info" : { diff --git a/iphone/Maps/Images.xcassets/Downloader/ProgressTriangle.imageset/ProgressTriangle.png b/iphone/Maps/Images.xcassets/Downloader/ProgressTriangle.imageset/ProgressTriangle.png index 91b75f4f32..7973e6cad7 100644 Binary files a/iphone/Maps/Images.xcassets/Downloader/ProgressTriangle.imageset/ProgressTriangle.png and b/iphone/Maps/Images.xcassets/Downloader/ProgressTriangle.imageset/ProgressTriangle.png differ diff --git a/iphone/Maps/Images.xcassets/Downloader/ProgressTriangle.imageset/ProgressTriangle@2x.png b/iphone/Maps/Images.xcassets/Downloader/ProgressTriangle.imageset/ProgressTriangle@2x.png index 21a09b5679..77f9b21bd0 100644 Binary files a/iphone/Maps/Images.xcassets/Downloader/ProgressTriangle.imageset/ProgressTriangle@2x.png and b/iphone/Maps/Images.xcassets/Downloader/ProgressTriangle.imageset/ProgressTriangle@2x.png differ diff --git a/iphone/Maps/Images.xcassets/Downloader/ProgressTriangle.imageset/ProgressTriangle@3x.png b/iphone/Maps/Images.xcassets/Downloader/ProgressTriangle.imageset/ProgressTriangle@3x.png index ddb772d7f2..933c906dfd 100644 Binary files a/iphone/Maps/Images.xcassets/Downloader/ProgressTriangle.imageset/ProgressTriangle@3x.png and b/iphone/Maps/Images.xcassets/Downloader/ProgressTriangle.imageset/ProgressTriangle@3x.png differ diff --git a/iphone/Maps/Images.xcassets/Downloader/RoutingDownloadedButton.imageset/routing_ok_mdpi.png b/iphone/Maps/Images.xcassets/Downloader/RoutingDownloadedButton.imageset/routing_ok_mdpi.png deleted file mode 100644 index c4c261bd16..0000000000 Binary files a/iphone/Maps/Images.xcassets/Downloader/RoutingDownloadedButton.imageset/routing_ok_mdpi.png and /dev/null differ diff --git a/iphone/Maps/Images.xcassets/Downloader/RoutingDownloadedButton.imageset/routing_ok_xhdpi.png b/iphone/Maps/Images.xcassets/Downloader/RoutingDownloadedButton.imageset/routing_ok_xhdpi.png deleted file mode 100644 index ad892f886d..0000000000 Binary files a/iphone/Maps/Images.xcassets/Downloader/RoutingDownloadedButton.imageset/routing_ok_xhdpi.png and /dev/null differ diff --git a/iphone/Maps/Images.xcassets/Downloader/RoutingDownloadedButton.imageset/routing_ok_xxhdpi.png b/iphone/Maps/Images.xcassets/Downloader/RoutingDownloadedButton.imageset/routing_ok_xxhdpi.png deleted file mode 100644 index 1dbc8989d8..0000000000 Binary files a/iphone/Maps/Images.xcassets/Downloader/RoutingDownloadedButton.imageset/routing_ok_xxhdpi.png and /dev/null differ diff --git a/iphone/Maps/Images.xcassets/Downloader/RoutingDownloadedButton.imageset/Contents.json b/iphone/Maps/Images.xcassets/Downloader/ic_routing_get_dark.imageset/Contents.json similarity index 50% rename from iphone/Maps/Images.xcassets/Downloader/RoutingDownloadedButton.imageset/Contents.json rename to iphone/Maps/Images.xcassets/Downloader/ic_routing_get_dark.imageset/Contents.json index f221adc6e2..610e66d102 100644 --- a/iphone/Maps/Images.xcassets/Downloader/RoutingDownloadedButton.imageset/Contents.json +++ b/iphone/Maps/Images.xcassets/Downloader/ic_routing_get_dark.imageset/Contents.json @@ -2,18 +2,18 @@ "images" : [ { "idiom" : "universal", - "scale" : "1x", - "filename" : "routing_ok_mdpi.png" + "filename" : "ic_routing_get_dark.png", + "scale" : "1x" }, { "idiom" : "universal", - "scale" : "2x", - "filename" : "routing_ok_xhdpi.png" + "filename" : "ic_routing_get_dark@2x.png", + "scale" : "2x" }, { "idiom" : "universal", - "scale" : "3x", - "filename" : "routing_ok_xxhdpi.png" + "filename" : "ic_routing_get_dark@3x.png", + "scale" : "3x" } ], "info" : { diff --git a/iphone/Maps/Images.xcassets/Downloader/ic_routing_get_dark.imageset/ic_routing_get_dark.png b/iphone/Maps/Images.xcassets/Downloader/ic_routing_get_dark.imageset/ic_routing_get_dark.png new file mode 100644 index 0000000000..e96a09eaaa Binary files /dev/null and b/iphone/Maps/Images.xcassets/Downloader/ic_routing_get_dark.imageset/ic_routing_get_dark.png differ diff --git a/iphone/Maps/Images.xcassets/Downloader/ic_routing_get_dark.imageset/ic_routing_get_dark@2x.png b/iphone/Maps/Images.xcassets/Downloader/ic_routing_get_dark.imageset/ic_routing_get_dark@2x.png new file mode 100644 index 0000000000..4ce5326132 Binary files /dev/null and b/iphone/Maps/Images.xcassets/Downloader/ic_routing_get_dark.imageset/ic_routing_get_dark@2x.png differ diff --git a/iphone/Maps/Images.xcassets/Downloader/ic_routing_get_dark.imageset/ic_routing_get_dark@3x.png b/iphone/Maps/Images.xcassets/Downloader/ic_routing_get_dark.imageset/ic_routing_get_dark@3x.png new file mode 100644 index 0000000000..54abc3ca25 Binary files /dev/null and b/iphone/Maps/Images.xcassets/Downloader/ic_routing_get_dark.imageset/ic_routing_get_dark@3x.png differ diff --git a/iphone/Maps/Images.xcassets/Downloader/ic_routing_get_light.imageset/Contents.json b/iphone/Maps/Images.xcassets/Downloader/ic_routing_get_light.imageset/Contents.json new file mode 100644 index 0000000000..0cb8549c7a --- /dev/null +++ b/iphone/Maps/Images.xcassets/Downloader/ic_routing_get_light.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "ic_routing_get_light.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "ic_routing_get_light@2x.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "ic_routing_get_light@3x.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/iphone/Maps/Images.xcassets/Downloader/ic_routing_get_light.imageset/ic_routing_get_light.png b/iphone/Maps/Images.xcassets/Downloader/ic_routing_get_light.imageset/ic_routing_get_light.png new file mode 100644 index 0000000000..52eaac99c3 Binary files /dev/null and b/iphone/Maps/Images.xcassets/Downloader/ic_routing_get_light.imageset/ic_routing_get_light.png differ diff --git a/iphone/Maps/Images.xcassets/Downloader/ic_routing_get_light.imageset/ic_routing_get_light@2x.png b/iphone/Maps/Images.xcassets/Downloader/ic_routing_get_light.imageset/ic_routing_get_light@2x.png new file mode 100644 index 0000000000..7b79e57cfe Binary files /dev/null and b/iphone/Maps/Images.xcassets/Downloader/ic_routing_get_light.imageset/ic_routing_get_light@2x.png differ diff --git a/iphone/Maps/Images.xcassets/Downloader/ic_routing_get_light.imageset/ic_routing_get_light@3x.png b/iphone/Maps/Images.xcassets/Downloader/ic_routing_get_light.imageset/ic_routing_get_light@3x.png new file mode 100644 index 0000000000..18dfe596a2 Binary files /dev/null and b/iphone/Maps/Images.xcassets/Downloader/ic_routing_get_light.imageset/ic_routing_get_light@3x.png differ diff --git a/iphone/Maps/Images.xcassets/Downloader/DownloadRoutingButton.imageset/Contents.json b/iphone/Maps/Images.xcassets/Downloader/ic_routing_ok_dark.imageset/Contents.json similarity index 50% rename from iphone/Maps/Images.xcassets/Downloader/DownloadRoutingButton.imageset/Contents.json rename to iphone/Maps/Images.xcassets/Downloader/ic_routing_ok_dark.imageset/Contents.json index 8742a59764..45732685ed 100644 --- a/iphone/Maps/Images.xcassets/Downloader/DownloadRoutingButton.imageset/Contents.json +++ b/iphone/Maps/Images.xcassets/Downloader/ic_routing_ok_dark.imageset/Contents.json @@ -2,18 +2,18 @@ "images" : [ { "idiom" : "universal", - "scale" : "1x", - "filename" : "routing_get_mdpi.png" + "filename" : "ic_routing_ok_dark.png", + "scale" : "1x" }, { "idiom" : "universal", - "scale" : "2x", - "filename" : "routing_get_xhdpi.png" + "filename" : "ic_routing_ok_dark@2x.png", + "scale" : "2x" }, { "idiom" : "universal", - "scale" : "3x", - "filename" : "routing_get_xxhdpi.png" + "filename" : "ic_routing_ok_dark@3x.png", + "scale" : "3x" } ], "info" : { diff --git a/iphone/Maps/Images.xcassets/Downloader/ic_routing_ok_dark.imageset/ic_routing_ok_dark.png b/iphone/Maps/Images.xcassets/Downloader/ic_routing_ok_dark.imageset/ic_routing_ok_dark.png new file mode 100644 index 0000000000..0396a6b858 Binary files /dev/null and b/iphone/Maps/Images.xcassets/Downloader/ic_routing_ok_dark.imageset/ic_routing_ok_dark.png differ diff --git a/iphone/Maps/Images.xcassets/Downloader/ic_routing_ok_dark.imageset/ic_routing_ok_dark@2x.png b/iphone/Maps/Images.xcassets/Downloader/ic_routing_ok_dark.imageset/ic_routing_ok_dark@2x.png new file mode 100644 index 0000000000..6831278a40 Binary files /dev/null and b/iphone/Maps/Images.xcassets/Downloader/ic_routing_ok_dark.imageset/ic_routing_ok_dark@2x.png differ diff --git a/iphone/Maps/Images.xcassets/Downloader/ic_routing_ok_dark.imageset/ic_routing_ok_dark@3x.png b/iphone/Maps/Images.xcassets/Downloader/ic_routing_ok_dark.imageset/ic_routing_ok_dark@3x.png new file mode 100644 index 0000000000..7d4d3e4909 Binary files /dev/null and b/iphone/Maps/Images.xcassets/Downloader/ic_routing_ok_dark.imageset/ic_routing_ok_dark@3x.png differ diff --git a/iphone/Maps/Images.xcassets/Downloader/ic_routing_ok_light.imageset/Contents.json b/iphone/Maps/Images.xcassets/Downloader/ic_routing_ok_light.imageset/Contents.json new file mode 100644 index 0000000000..2d780198bd --- /dev/null +++ b/iphone/Maps/Images.xcassets/Downloader/ic_routing_ok_light.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "ic_routing_ok_light.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "ic_routing_ok_light@2x.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "ic_routing_ok_light@3x.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/iphone/Maps/Images.xcassets/Downloader/ic_routing_ok_light.imageset/ic_routing_ok_light.png b/iphone/Maps/Images.xcassets/Downloader/ic_routing_ok_light.imageset/ic_routing_ok_light.png new file mode 100644 index 0000000000..6ca5195a81 Binary files /dev/null and b/iphone/Maps/Images.xcassets/Downloader/ic_routing_ok_light.imageset/ic_routing_ok_light.png differ diff --git a/iphone/Maps/Images.xcassets/Downloader/ic_routing_ok_light.imageset/ic_routing_ok_light@2x.png b/iphone/Maps/Images.xcassets/Downloader/ic_routing_ok_light.imageset/ic_routing_ok_light@2x.png new file mode 100644 index 0000000000..c00ecce9f4 Binary files /dev/null and b/iphone/Maps/Images.xcassets/Downloader/ic_routing_ok_light.imageset/ic_routing_ok_light@2x.png differ diff --git a/iphone/Maps/Images.xcassets/Downloader/ic_routing_ok_light.imageset/ic_routing_ok_light@3x.png b/iphone/Maps/Images.xcassets/Downloader/ic_routing_ok_light.imageset/ic_routing_ok_light@3x.png new file mode 100644 index 0000000000..044cd9ad51 Binary files /dev/null and b/iphone/Maps/Images.xcassets/Downloader/ic_routing_ok_light.imageset/ic_routing_ok_light@3x.png differ diff --git a/iphone/Maps/MWMNightModeController.mm b/iphone/Maps/MWMNightModeController.mm index 50a575fa11..3594778ba7 100644 --- a/iphone/Maps/MWMNightModeController.mm +++ b/iphone/Maps/MWMNightModeController.mm @@ -5,8 +5,6 @@ #include "Framework.h" -extern NSString * const kUDAutoNightMode; - @interface MWMNightModeController () @property (weak, nonatomic) IBOutlet SelectableCell * autoSwitch; @@ -22,7 +20,7 @@ extern NSString * const kUDAutoNightMode; { [super viewDidLoad]; self.title = L(@"pref_map_style_title"); - if ([[NSUserDefaults standardUserDefaults] boolForKey:kUDAutoNightMode]) + if ([MapsAppDelegate isAutoNightMode]) { self.autoSwitch.accessoryType = UITableViewCellAccessoryCheckmark; _selectedCell = self.autoSwitch; @@ -52,7 +50,6 @@ extern NSString * const kUDAutoNightMode; _selectedCell = cell; auto & f = GetFramework(); - auto app = MapsAppDelegate.theApp; auto const style = f.GetMapStyle(); if ([cell isEqual:self.on]) { @@ -60,7 +57,7 @@ extern NSString * const kUDAutoNightMode; return; f.SetMapStyle(MapStyleDark); [UIColor setNightMode:YES]; - [app stopMapStyleChecker]; + [MapsAppDelegate setAutoNightModeOn:NO]; [self refresh]; } else if ([cell isEqual:self.off]) @@ -69,13 +66,13 @@ extern NSString * const kUDAutoNightMode; return; f.SetMapStyle(MapStyleClear); [UIColor setNightMode:NO]; - [app stopMapStyleChecker]; + [MapsAppDelegate setAutoNightModeOn:NO]; [self refresh]; } else if ([cell isEqual:self.autoSwitch]) { - [app startMapStyleChecker]; - [app changeMapStyleIfNedeed]; + [MapsAppDelegate setAutoNightModeOn:YES]; + [MapsAppDelegate changeMapStyleIfNedeed]; } } diff --git a/iphone/Maps/TableViewController.mm b/iphone/Maps/TableViewController.mm index 6a1cabd9cc..ecc39ac20e 100644 --- a/iphone/Maps/TableViewController.mm +++ b/iphone/Maps/TableViewController.mm @@ -15,7 +15,6 @@ - (void)refresh { - [MapsAppDelegate customizeAppearance]; [self.navigationController.navigationBar refresh]; for (UIViewController * vc in self.navigationController.viewControllers.reverseObjectEnumerator) { diff --git a/iphone/Maps/UIColor+MapsMeColor.h b/iphone/Maps/UIColor+MapsMeColor.h index 37b3b939b1..194daf7fc8 100644 --- a/iphone/Maps/UIColor+MapsMeColor.h +++ b/iphone/Maps/UIColor+MapsMeColor.h @@ -24,6 +24,7 @@ + (UIColor *)buttonDisabledBlueText; + (UIColor *)buttonHighlightedBlueText; + (UIColor *)alertBackground; ++ (UIColor *)blackOpaque; + (UIColor *)colorWithName:(NSString *)colorName; diff --git a/iphone/Maps/UIColor+MapsMeColor.mm b/iphone/Maps/UIColor+MapsMeColor.mm index 128fd25d66..1a85df43b6 100644 --- a/iphone/Maps/UIColor+MapsMeColor.mm +++ b/iphone/Maps/UIColor+MapsMeColor.mm @@ -3,6 +3,7 @@ namespace { +CGFloat const alpha04 = 0.04; CGFloat const alpha12 = 0.12; CGFloat const alpha26 = 0.26; CGFloat const alpha30 = 0.3; @@ -43,9 +44,10 @@ NSDictionary * night = @"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], - @"whiteSecondaryText" : [UIColor colorWithWhite:1. alpha:alpha70], + @"whiteSecondaryText" : [UIColor colorWithWhite:0. alpha:alpha70], @"buttonDisabledBlueText" : [UIColor colorWithRed:scaled(255.) green:scaled(230.) blue:scaled(140.) alpha:alpha30], - @"alertBackground" : [UIColor colorWithRed:scaled(60.) green:scaled(64.) blue:scaled(68.) alpha:alpha90] + @"alertBackground" : [UIColor colorWithRed:scaled(60.) green:scaled(64.) blue:scaled(68.) alpha:alpha90], + @"blackOpaque" : [UIColor colorWithWhite:1. alpha:alpha04] }; NSDictionary * day = @@ -72,7 +74,8 @@ NSDictionary * day = @"white" : [UIColor colorWithWhite:1. alpha:alpha100], @"whiteSecondaryText" : [UIColor colorWithWhite:1. alpha:alpha54], @"buttonDisabledBlueText" :[UIColor colorWithRed:scaled(3.) green:scaled(122.) blue:scaled(255.) alpha:alpha26], - @"alertBackground" : [UIColor colorWithWhite:1. alpha:alpha90] + @"alertBackground" : [UIColor colorWithWhite:1. alpha:alpha90], + @"blackOpaque" : [UIColor colorWithWhite:0. alpha:alpha04] }; UIColor * color(SEL cmd) @@ -225,6 +228,11 @@ UIColor * color(SEL cmd) return color(_cmd); } ++ (UIColor *)blackOpaque +{ + return color(_cmd); +} + + (UIColor *)colorWithName:(NSString *)colorName { #pragma clang diagnostic push diff --git a/iphone/Maps/ViewController.mm b/iphone/Maps/ViewController.mm index df482fd808..7235279fde 100644 --- a/iphone/Maps/ViewController.mm +++ b/iphone/Maps/ViewController.mm @@ -12,7 +12,6 @@ - (void)refresh { - [MapsAppDelegate customizeAppearance]; [self.navigationController.navigationBar refresh]; [self.view refresh]; if (![self isKindOfClass:[MapViewController class]])