diff --git a/iphone/Maps/Classes/MapsAppDelegate.h b/iphone/Maps/Classes/MapsAppDelegate.h index c347861c5d..7c5a2e75d5 100644 --- a/iphone/Maps/Classes/MapsAppDelegate.h +++ b/iphone/Maps/Classes/MapsAppDelegate.h @@ -49,4 +49,6 @@ typedef NS_ENUM(NSUInteger, MWMRoutingPlaneMode) - (void)setMapStyle:(MapStyle)mapStyle; +- (void)customizeAppearanceForNavigationBar:(UINavigationBar *)navigationBar; + @end diff --git a/iphone/Maps/Classes/MapsAppDelegate.mm b/iphone/Maps/Classes/MapsAppDelegate.mm index 36d9bf1503..877859c2ec 100644 --- a/iphone/Maps/Classes/MapsAppDelegate.mm +++ b/iphone/Maps/Classes/MapsAppDelegate.mm @@ -512,21 +512,33 @@ void InitLocalizedStrings() [self.mapViewController setMapStyle: mapStyle]; } -+ (void)customizeAppearance + (NSDictionary *)navigationBarTextAttributes { - NSDictionary * attributes = @{ + return @{ NSForegroundColorAttributeName : [UIColor whitePrimaryText], NSFontAttributeName : [UIFont regular18] }; +} - UINavigationBar * navBar = [UINavigationBar appearance]; - navBar.tintColor = [UIColor primary]; - navBar.barTintColor = [UIColor primary]; - navBar.shadowImage = [UIImage imageWithColor:[UIColor fadeBackground]]; - navBar.titleTextAttributes = attributes; +- (void)customizeAppearanceForNavigationBar:(UINavigationBar *)navigationBar +{ + navigationBar.tintColor = [UIColor primary]; + navigationBar.barTintColor = [UIColor primary]; + [navigationBar setBackgroundImage:nil forBarMetrics:UIBarMetricsDefault]; + navigationBar.shadowImage = [UIImage imageWithColor:[UIColor fadeBackground]]; + navigationBar.titleTextAttributes = [self navigationBarTextAttributes]; + navigationBar.translucent = NO; +} + +- (void)customizeAppearance +{ + [self customizeAppearanceForNavigationBar:[UINavigationBar appearance]]; UIBarButtonItem * barBtn = [UIBarButtonItem appearance]; - [barBtn setTitleTextAttributes:attributes forState:UIControlStateNormal]; + [barBtn setTitleTextAttributes:[self navigationBarTextAttributes] forState:UIControlStateNormal]; + [barBtn setTitleTextAttributes:@{ + NSForegroundColorAttributeName : [UIColor lightGrayColor], + } forState:UIControlStateDisabled]; barBtn.tintColor = [UIColor whitePrimaryText]; UIPageControl * pageControl = [UIPageControl appearance]; @@ -535,6 +547,7 @@ void InitLocalizedStrings() pageControl.backgroundColor = [UIColor white]; } + - (void)application:(UIApplication *)application didReceiveLocalNotification:(UILocalNotification *)notification { [[LocalNotificationManager sharedManager] processNotification:notification onLaunch:NO];