2017-08-02 44 views
0

所以我在Xcode中使用本地“更多”功能选项卡栏。我已经设法以编程方式导航标题颜色的导航栏&。更多选项卡,行图像色调(Xcode 9 + Swift 4)

//sets the font color 
UINavigationBar.appearance().titleTextAttributes = [NSAttributedStringKey.foregroundColor.rawValue: UIColor.white] 

//sets the tint color, which dictates the button color 
UINavigationBar.appearance().tintColor = UIColor.white 

//sets the Bar tint color 
UINavigationBar.appearance().barTintColor = UIColor(red: 0/255, green: 175/255, blue: 65/255, alpha: 1.0) 

但有没有办法改变这些蓝色图标(参考图像下面)的色调?我上传的图片是绿色的,但已被着色&我无法找到设置。有谁知道如何改变这个?

Image 1Image 2

+0

你想改变的TabBar或导航栏的颜色? –

+0

@saroshmirza我想改变表格视图和“编辑”功能中单元格左边的蓝色图像/图标的色调。检查在帖子底部的图像链接,以供参考:) –

+0

@JamesRhymer蓝色显示的项目是图像或按钮? –

回答

0

你只需要初始化图像:

UIImage.(withRenderingMode: .alwaysTemplate)

,然后改变

UIImageView.tintColor = .green

+0

嘿,我不知道如果我没有办法连接到它,如何在这种情况下初始化图像?更多部分没有视图控制器或任何方式让我按名称引用它们。只要确保你看到附加的图像? –

+0

你能分享一下cellForRow方法吗? –

相关问题