最新消息:20210816 当前crifan.com域名已被污染,为防止失联,请关注(页面右下角的)公众号

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

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

改为:

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

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

发表我的评论
取消评论

表情

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

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
84 queries in 0.183 seconds, using 22.04MB memory