I want to perform animation compression on UITableVIew. I experimented a bit and found out that the animation is much faster when I reduce the UIImageView with an image of the current state of the table, instead of reducing the presentation of the table.
I captured the image in the method in my main view manager before the animation:
UIGraphicsBeginImageContext(mainTableView.bounds.size);
[resizeContainer.layer renderInContext:UIGraphicsGetCurrentContext()];
UIImage *viewImage = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
Works like a charm, at least almost. In very rare cases, I get strange graphical crashes where UIImage begins to overlap the toolbar below it.
I just want to make sure I get the image correctly. I understand that you need to understand GraphicContexts.
In short, is my code correct?
thanks