设置UINavigationBar的UI

 if ([UIDevice currentDevice].systemVersion.floatValue >= 7.0) {

        [[UINavigationBar appearance] setBarTintColor:[XHMToolchangeColor:@"dc424c"]];

        [[UINavigationBar appearance] setTintColor:[UIColor whiteColor]];

        [[UINavigationBar appearance] setTitleTextAttributes:

         [NSDictionary dictionaryWithObjectsAndKeys:RGBACOLOR(245, 245, 245, 1),NSForegroundColorAttributeName, [UIFont fontWithName:@ "HelveticaNeue-CondensedBlack" size:21.0], NSFontAttributeName, nil]];

        [[UINavigationBar appearance] setTitleVerticalPositionAdjustment:-10forBarMetrics:UIBarMetricsDefault];

    }

你可能感兴趣的:(设置UINavigationBar的UI)