How do I bring a CALayer sublayer to the front of all sublayers, analogous to -[UIView bringSubviewToFront]?
CALayer sublayer
-[UIView bringSubviewToFront]
This is the correct code:
-(void)bringSubLayerToFront:(CALayer*)layer { [layer.superLayer addSubLayer:layer]; } -(void)sendSubLayerToBack:(CALayer*)layer { [layer.superlayer insertSublayer:layer atIndex:0]; }