2013年9月14日 星期六

如何設定Navigation上的Title和Color











在你的ViewController.m 中
- (void)viewDidLoad{

    [self.navigationItem setTitle:@"Any Title"];

}




如果要設定顏色 在AppDelegate中

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{

    [[UINavigationBar appearance] setTintColor:[UIColor colorWithRed:0.000 green:0.251 blue:0.502 alpha:1.000]];

}



換成    [[UINavigationBar appearance] setTintColor:[UIColor colorWithRed:0.573 green:0.802 blue:0.810 alpha:1.000]];的話





沒有留言:

張貼留言