为什么在我的UIcolour中出现这个错误?
问题描述:
func changeColor(sender: UIButton) {
self.view.backgroundColor = UIColor.randomColor()
}
生成错误: -
Type 'UIColor' has no member 'randomColor'
。为什么在我的UIcolour中出现这个错误?
func changeColor(sender: UIButton) {
self.view.backgroundColor = UIColor.randomColor()
}
生成错误: -
Type 'UIColor' has no member 'randomColor'
。为什么在我的UIcolour中出现这个错误?
@ user5473955-对于UIColor(),他们没有方法randomcolor那就是为什么你得到这个错误。 –