I worked with protocols .... I implement a protocol in all UIViews classes that do 3D transforms. So when I request a screenshot, it takes all the subviews screenshots and generates one UIImage. Not so good for a lot of views, but I do a few views.
#pragma mark - Protocol implementation 'TDITransitionCustomTransform' //Conforms to "TDITransitionCustomTransform" protocol, return currrent image view state , by current layer - (UIImage*)imageForCurrentState { //Make print UIGraphicsBeginImageContextWithOptions(self.bounds.size, NO, 0.0); [self.layer renderInContext:UIGraphicsGetCurrentContext()]; UIImage *screenShot = UIGraphicsGetImageFromCurrentImageContext(); UIGraphicsEndImageContext(); //return printed image return screenShot; }
I thought this could work now because I am rendering this render in the converted view layer, which was transformed by myself ... And it didn’t work because “renderInContext:” does not receive layers of its subzones, is this possible?
Any interest in even more code for this solution can be found here . in the apple dev forum.
It may be a function error, or it is simply not intended for this purpose ...
source share