You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi there,
I've noticed that there is bug when device orientation comes into place. To reproduce the error select an image from the main view, it takes you to destination controller, then change device orientation and go back, the collection view stays in the previous orientation and do not updates. Could you advice a solution for this problem ?
The text was updated successfully, but these errors were encountered:
Not sure how good the solution is, but I fixed this for myself by changing ZoomTransitioning.swift
In animateTransitionForPop under the line that sets containerView:
let containerView: UIView = transitionContext.containerView // under this line
sourceView.frame = containerView.frame
The issue seems to be that sourceView still has its old frame. Setting its frame to be equal to containerView fixed the issue for me.
I also had to update my ZoomTransitionSourceDelegate for the pop case:
I needed to add something like:
func transitionSourceImageViewFrame(forward: Bool) -> CGRect {
if !forward {
UIView.performWithoutAnimation {
view.setNeedsLayout()
view.layoutIfNeeded()
}
}
return transitionView.convert(transitionView.bounds, to view)
}
The key was that the view needed to be laid out again to get things in the correct position for animating back to (in the case that the device had been rotated).
Hi there,
I've noticed that there is bug when device orientation comes into place. To reproduce the error select an image from the main view, it takes you to destination controller, then change device orientation and go back, the collection view stays in the previous orientation and do not updates. Could you advice a solution for this problem ?
The text was updated successfully, but these errors were encountered: