码迷,mamicode.com
首页 > 其他好文 > 详细

UIView的背景颜色

时间:2015-06-23 13:21:18      阅读:106      评论:0      收藏:0      [点我收藏+]

标签:

一个UIColor代表一种颜色,通过UIColor的类方法,可以获得很多常用的颜色
+ (UIColor *)blackColor;      // 0.0 white 黑色
+ (UIColor *)darkGrayColor;   // 0.333 white 深灰色
+ (UIColor *)lightGrayColor;  // 0.667 white 亮灰色
+ (UIColor *)whiteColor;      // 1.0 white 白色
+ (UIColor *)grayColor;       // 0.5 white 灰色
+ (UIColor *)redColor;        // 1.0, 0.0, 0.0 RGB 红色
+ (UIColor *)greenColor;      // 0.0, 1.0, 0.0 RGB 绿色
+ (UIColor *)blueColor;       // 0.0, 0.0, 1.0 RGB 蓝色
+ (UIColor *)cyanColor;       // 0.0, 1.0, 1.0 RGB 青色
+ (UIColor *)yellowColor;     // 1.0, 1.0, 0.0 RGB 黄色
+ (UIColor *)magentaColor;    // 1.0, 0.0, 1.0 RGB 品红
+ (UIColor *)orangeColor;     // 1.0, 0.5, 0.0 RGB 橙色
+ (UIColor *)purpleColor;     // 0.5, 0.0, 0.5 RGB 紫色
+ (UIColor *)brownColor;      // 0.6, 0.4, 0.2 RGB 棕色
+ (UIColor *)clearColor;      // 0.0 white, 0.0 alpha 清除颜色(空色
 

UIView的背景颜色

标签:

原文地址:http://www.cnblogs.com/Opaser/p/4595169.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!