标签: swift colors xcode9
Im not sure why it will nit let me bring in the blue color have looked for multiple resources before posting here and why it is saying the UIView "has no member"
尝试使用3年前的视频在swift 4上学习Xcode比我想象的要困难。
答案 0 :(得分:0)
你有两个问题。首先是颜色的正确参考。我可以帮忙。 UIColor有一个返回蓝色的方法,应该用来代替blue():
UIColor
blue()
UIColor.blue()
就你的第二个错误而言,我不知道你正在调用哪个类addSubView(),但它可能只是第一个错误的症状。如果我提议的更改不起作用,请提供一些其他信息,我很乐意为您提供帮助。
addSubView()