From 021283e6ef7a94e91809624277f559d902f4287b Mon Sep 17 00:00:00 2001 From: Yuki MIZUNO Date: Mon, 5 Jan 2015 17:20:10 +0900 Subject: [PATCH] Fix font family on UISegmentedControl --- Limelight/AppDelegate.m | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Limelight/AppDelegate.m b/Limelight/AppDelegate.m index c697a16e..47462483 100644 --- a/Limelight/AppDelegate.m +++ b/Limelight/AppDelegate.m @@ -19,7 +19,6 @@ static NSOperationQueue* mainQueue; - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { [[UILabel appearance] setFont:[UIFont fontWithName:@"Roboto-Regular" size:[UIFont systemFontSize]]]; - [[UISegmentedControl appearance] setTitleTextAttributes:[NSDictionary dictionaryWithObjectsAndKeys:[UIFont fontWithName:@"Roboto-Regular" size:[UIFont systemFontSize]], NSFontAttributeName, nil] forState:UIControlStateNormal]; [[UIButton appearance].titleLabel setFont:[UIFont fontWithName:@"Roboto-Regular" size:[UIFont systemFontSize]]]; @@ -42,9 +41,10 @@ static NSOperationQueue* mainQueue; // Set selected segment background image [[UISegmentedControl appearance] setBackgroundImage:[selectedSegmentBG imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate] forState:UIControlStateSelected barMetrics:UIBarMetricsDefault]; - // Change text color on UISegmentedControl - [[UISegmentedControl appearance] setTitleTextAttributes:@{NSForegroundColorAttributeName: [UIColor whiteColor]} forState:UIControlStateNormal]; - [[UISegmentedControl appearance] setTitleTextAttributes:@{NSForegroundColorAttributeName: [UIColor whiteColor]} forState:UIControlStateSelected]; + // Change font on UISegmentedControl + [[UISegmentedControl appearance] setTitleTextAttributes:[NSDictionary dictionaryWithObjectsAndKeys: + [UIColor whiteColor], NSForegroundColorAttributeName, + [UIFont fontWithName:@"Roboto-Regular" size:[UIFont systemFontSize]], NSFontAttributeName, nil] forState:UIControlStateNormal]; return YES; }