如何自定义 InAppSettingsKit(背景颜色和导航栏颜色)?
我想将 InAppSettingsKit 视图的背景颜色更改为黑色,并且我还想将导航栏颜色更新为深灰色。但是我似乎找不到有关如何执行此操作的任何详细信息。
我考虑过进入 XIB 文件并手动更改它,但这似乎不是正确的方法。请问有人可以帮我吗?
I would like to change the colour of the background to the InAppSettingsKit view to be black and I would also like to update the navbar colour to a dark grey. However I can't seem to find any details on how to do this.
I have considered just going into the XIB file and changing it manually but it doesn't seem like the right approach. Please can someone help me out?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我假设您想要定位 5.0 之前的旧 iOS 版本。 (对于 5.0 及更高版本,您可以利用新的 UIAppearance 内容。)
如果只是更改导航栏和条纹 tableView 背景,则非常简单:我建议使用类别覆盖
+[UIColor groupTableViewBackgroundColor]
在UIColor
上返回黑色。导航栏甚至更容易,因为 IASK 应该从导航控制器继承导航栏。如果您的需求更复杂,您可能需要更改 XIB。
I assume you wanna target older iOS releases than 5.0. (For 5.0 and up you could leverage the new UIAppearance stuff.)
If it's just about changing the navigation bar and the striped tableView background, it's pretty easy: I suggest overriding
+[UIColor groupTableViewBackgroundColor]
using a category onUIColor
to return your black color. The navigation bar is even easier, because IASK should inherit the navigation bar from your navigation controller.If your needs are more complicated, you might wanna resort changing the XIBs.