Can I take a screenshot with a view that includes CAEmitterLayer?
Whenever I try, the view is created perfectly, but all the particles are missing, here is my code:
UIGraphicsBeginImageContext(drawingView.frame.size) var context:CGContextRef = UIGraphicsGetCurrentContext() drawingView.layer.renderInContext(context) let image = UIGraphicsGetImageFromCurrentImageContext() UIGraphicsEndImageContext() return image
I confirmed that CAEmitterLayer is in drawing.layer drawing
Chris source share