当前位置:编程学习 > wap >>

提取UIColor的rgba

  CGFloat R=0.0,G=0.0,B=0.0,A= 0.0;
    CGColorRef color = _innerColor.CGColor;
    int numComponents = CGColorGetNumberOfComponents(color);
    if (numComponents==4)  www.zzzyk.com
    {
        const CGFloat *components = CGColorGetComponents(color);
        R = components[0];
        G = components[1];
        B = components[2];
        A = components[3];
    }
补充:移动开发 , IOS ,
CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,