最新消息:20210917 已从crifan.com换到crifan.org

[已解决]swift设置了工具栏背景色但不生效

Swift crifan 1950浏览 0评论
设置了工具栏的背景色,但是不生效。
搜:
swift  UIToolbar backgroundColor not work
参考帖子,最后去:
UIToolbar.appearance().backgroundColor = UIColor.redColor()

改为:

UIToolbar.appearance().barTintColor = UIColor.redColor()
即可。

转载请注明:在路上 » [已解决]swift设置了工具栏背景色但不生效

发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
88 queries in 0.216 seconds, using 20.07MB memory