I'm trying to take a hidden view, but I have a few problems. If I try to show it quickly by taking a picture and then returning it, I sometimes get a quick flicker on the screen, which is pretty annoying.
toCollectionViewCell.hidden = NO; UIView *toPlaceHolderSnapshot = [toCollectionViewCell resizableSnapshotViewFromRect:toCollectionViewCell.bounds afterScreenUpdates:YES withCapInsets:UIEdgeInsetsZero]; toCollectionViewCell.hidden = YES;
I am sure the flicker is caused by afterScreenUpdates: YES, but I canβt imagine that this is the intended behavior.
I also tried to move the cell / view from the screen instead of hiding it, but I cannot be sure that this cell can be reloaded and therefore prematurely moved to its place.
Is there a way to take a hidden view or a smarter way to achieve this? I need this functionality during a custom transition animation, where I take the collection view cell out of the collection view and then put it back in place upon dismissal. I take pre / post snapshots and then switch between them during the animation.
Thanks!
Danny source share