Adding CAShapeLayer as sublayer not visible
问题 I'm having my first experience with CALayers , and am no doubt doing something very simple, very wrong. The below code is in a class extended from a UIView . I am accessing the CALayer of the view, which is fine, and the attempting to attach a sublayer, based on a line drawn by the users touch. (The CGPath ) By setting the background to bright orange, I can see that I'm passing the right CALayer into my function, yet if I try and set the CAShapeLayer *line to orange - I don't seem to be able