Radial CAGradientLayer not rendering properly at runtime
问题 I'm trying to create a radial CAGradientLayer in swift. Normal CAGradientLayers (with default type axial ) are no problem. They are rendering fine on the snapshot and on runtime in the simulator. When I take a snapshot of the UIView that I created (solely for the CAGradientLayer), it shows a beautiful radial CAGradientLayer. However, when I use this view and look at it at runtime in the simulator, it looks awful. I don't know what I'm doing wrong. This is the code for the CAGradientLayer: