objective-c - 为什么borderColor要使用CGColor而不能使用UIColor
高洛峰
高洛峰 2017-05-02 09:19:51
0
1
534

我在别的地方看到这样一句话
CALayer sits at a lower technical level than UIButton, which means it doesn't understand what a UIColor is. UIButton knows what a UIColor is because they are both at the same technical level, but CALayer is below UIButton, so UIColor is a mystery.

高洛峰
高洛峰

拥有18年软件开发和IT教学经验。曾任多家上市公司技术总监、架构师、项目经理、高级软件工程师等职务。 网络人气名人讲师,...

全部回复(1)
巴扎黑

CGColor存在于较为底层的CoreGraphics框架中,它是一个结构体
UIColor存在于相对CoreGraphics框架较高的UIKit框架中,他是一个类

CoreGraphics框架是可以跨平台使用的,UIKit框架仅限于iOS
为了保证移植性以及框架的统一性,不能互用

热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板
关于我们 免责声明 Sitemap
PHP中文网:公益在线PHP培训,帮助PHP学习者快速成长!