Appdelegate 导航操作

隐藏返回按钮

 self.navigationItem.hidesBackButton = YES;

设置导航的透明度

self.navigationController.navigationBar.translucent = NO;

设置导航条的背景颜色 好使杠杠的

[[UINavigationBar appearance] setBarTintColor:[UIColor colorWithHexString:@"#006f6b" withAlpha:1]];

[[UINavigationBar appearance] setBackgroundImage:[[UIImage imageNamed:@"Bar_导航条"] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal] forBarMetrics:UIBarMetricsDefault];

    [[UINavigationBar appearance] setTitleTextAttributes:@{NSForegroundColorAttributeName:kColor(255, 255, 255, 1),NSFontAttributeName:[UIFont boldSystemFontOfSize:17.0]}];

    [[UITabBar appearance] setTintColor:[UIColor colorWithRed:1.000 green:0.671 blue:0.163 alpha:1.000]];下面的工具条

    [self hasLogin];

    MainTabBarViewController *mtc = [[MainTabBarViewController alloc]init];

    self.mainView = mtc;

    self.window.rootViewController = mtc;

[self.window makeKeyAndVisible];

 

UIBarButtonItem *back = [[UIBarButtonItem alloc]initWithImage:[[UIImage imageNamed:@"back_btn_n (2)"] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal] style:UIBarButtonItemStyleBordered target:self     action:@selector(finish)];

    self.navigationItem.leftBarButtonItem = back;

原文地址:https://www.cnblogs.com/zhaozhongpeng/p/4867846.html