您的位置:首页 > 移动开发

Appdelegate 导航操作

2015-10-10 17:57 218 查看

隐藏返回按钮

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;
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: