0

I have an UIView (inside a LaunchScreen, so not many options customizing it), for which I've specified a backgroundColor through IB. The first VC that comes up after the app launches has a CALayer that should be identical to the LaunchScreen... except it isn't.

I know there is some color correction applied, but I can't seem to find the relevant documentation to understand the process. I would assume I need to specify the correct color space when creating the CGColor that's used as a background for the CALayer.

CatalinM
  • 520
  • 1
  • 5
  • 20

1 Answers1

0

You can set color for CALayer

layer.backgroundColor = [[UIColor greenColor] CGColor]; //obj c
layer.backgroundColor = UIColor.greenColor.cgColor //swift

It will set the same greenColor you applied to launch screen.

If your setting RGB value in interface, take care for selecting right RGB profile,

enter image description here

Baig
  • 4,737
  • 1
  • 32
  • 47