Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

如何修改rootvc的导航栏颜色 #5

Closed
huangxianhui001 opened this issue Jul 4, 2016 · 3 comments
Closed

如何修改rootvc的导航栏颜色 #5

huangxianhui001 opened this issue Jul 4, 2016 · 3 comments

Comments

@huangxianhui001
Copy link

下载你的Demo,注释掉appdelegate的代码,使用包含tabbarController的例子,然后发现Root那个tabbar的根控制器是RTStaticTableViewController,我想要修改这个控制器的导航栏背景色,或者自定义导航栏样式,在该.m文件中添加rt_navigationBarClass这个方法,返回一个自定义UINavigationBar类,但是没有效果,请问,在这种情况下,如何修改根控制器的导航栏背景?

@rickytan
Copy link
Owner

rickytan commented Jul 4, 2016

像以前一样就好了:

[self.navigationController.navigationBar setBarTintColor:xxx]

@huangxianhui001
Copy link
Author

还是不行啊,比如在RTPushRemoveViewController里面添加一个touchesBegan:withEvent:,方法在触摸开始时,push一个新的RTPushRemoveViewController对象进来,然后我在这个控制器的viewwillAppear方法修改:[self.navigationController.navigationBar setBarTintColor:[UIColor blueColor]],在新push的这个页面,颜色就有改,但是作为RTContainerNavigationController根控制器的那个页面,位于栈底的那个控制器,就是没法改

@rickytan
Copy link
Owner

rickytan commented Jul 5, 2016

已修复,感谢反馈(应该是 fix #5 ,打错了):61f877a

@rickytan rickytan closed this as completed Jul 5, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants