a UIView is created and small snow.png is kept added and removed to UIView to simulate the snowing effect.
Then I would like to capture the screen as an image.
UIGraphicsBeginImageContext(self.uiviewPreview.bounds.size);
[self.uiviewPreview.layer renderInContext:UIGraphicsGetCurrentContext()];
UIImage *viewImage = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
UIImageWriteToSavedPhotosAlbum(viewImage, nil, nil, nil);
Note: self.uiviewPreview is the UIView.
But I can only see the image in UIview in the saved jpg. But all added subviews at that moment are not saved.
I would like to know whether renderInContext is correct or not to use