简体   繁体   English

swift 3 中的 UIColor.redColor().CGColor

[英]UIColor.redColor().CGColor in swift 3

UIColor.redColor().CGColor is giving error Cannot call value of non-function type 'UIColor' UIColor.redColor().CGColor给出错误Cannot call value of non-function type 'UIColor'

What's has changed in the recent swift version?最近的 swift 版本有什么变化?

The latest swift 3 syntax for UIColor.redColor().CGColor is UIColor.red.cgColor UIColor.redColor().CGColor的最新 swift 3 语法是UIColor.red.cgColor

The redColor() method is changed to red getter and CGColor property is changed to cgColor redColor()方法更改为red getter 并且CGColor属性更改为cgColor

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM