UIColor and CIColor how do they compare and what is the purpose of having two of them?

前端 未结 4 1216
醉梦人生
醉梦人生 2021-01-23 02:35

Recently I encountered some code where trying to get the CIColor property of a UIColor fails. The UIColor was initialized as a simple [UIColor blackColor] and trying to get the

4条回答
  •  鱼传尺愫
    2021-01-23 02:50

    try this(swift version)

     var clcor = CIColor(color: UIColor.redColor())
    

    obj :

    CIColor *aCIColor = [[CIColor alloc] initWithColor:[NSColor blackColor]];
    

提交回复
热议问题