zoukankan      html  css  js  c++  java
  • ios UIColor

    转载自:http://www.cnblogs.com/xgbzsc/archive/2013/01/16/2862611.html,尊重原创!

    1. 利用UIColor展现 #F6F6F6 这个传统的颜色
    #F6F6F6 为一个 16 进制表示的RPG颜色,所以,需要先转换成 10进制,其中 F6 - 240,F6 -  240 ,F6 - 240 之后,一行代码即可  UIColor *testColor1= [UIColor colorWithRed:240/255.0 green:240/255.0 blue:240/255.0 alpha:1];

    2. UIColor 、CIColor和CGColor 之间的关系
    出现在不同的类库里面,其实就是颜色存储方式不同而已,比如 999 可以用 10进制、2 进制、16 进制等存储。
    三者之间都是能够方便转换的,特别是很多构造函数
    3. UIColor 定义了许多静态方法,能够方便的得到一些已经自定义好的颜色,使用起来比较方便,如:
    UIColor blackColor UIColor darkGrayColor UIColor lightGrayColor UIColor whiteColor UIColor grayColor UIColor redColor UIColor greenColor UIColor blueColor UIColor cyanColor UIColor yellowColor UIColor magentaColor UIColor orangeColor UIColor purpleColor UIColor brownColor UIColor clearColor UIColor lightTextColor UIColor darkTextColor UIColor groupTableViewBackgroundColor UIColor viewFlipsideBackgroundColor UIColor scrollViewTexturedBackgroundColor UIColor underPageBackgroundColor

  • 相关阅读:
    Python 函数装饰器简明教程
    *arg和**kwarg的区别
    克里金插值
    C语言Hello world
    ibatis错误
    typealias
    视图
    权限分级设置
    走出浮躁的泥沼:学会享受学习过程的乐趣
    R语言 eval(quote(x)) 和 eval(x)
  • 原文地址:https://www.cnblogs.com/wyqfighting/p/3228081.html
Copyright © 2011-2022 走看看