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, I have 4 views with Labels. When I change orientation the view is in wrong position (I think the scroll view is responsible for this).
This is how it looks
and from landscape to portrait
I have managed to do some nasty hack with this code
varlastIndex=0func scrollPager(scrollPager:ScrollPager, changedIndex:Int){print("scrollPager index changed: \(changedIndex)")
lastIndex = changedIndex
}overridefunc willTransition(to newCollection:UITraitCollection, with coordinator:UIViewControllerTransitionCoordinator){
coordinator.animate(alongsideTransition:nil){ _ inself.scrollPager.setSelectedIndex(index:self.lastIndex, animated: false)}}
It would be much better when selectedIndex property was public (the getter) than private because I wouldn't have to remember the index. Please fix this to scroll automatically to right view when orientation changes.
The text was updated successfully, but these errors were encountered:
Hi, I have 4 views with Labels. When I change orientation the view is in wrong position (I think the scroll view is responsible for this).
This is how it looks
and from landscape to portrait
I have managed to do some nasty hack with this code
It would be much better when selectedIndex property was public (the getter) than private because I wouldn't have to remember the index. Please fix this to scroll automatically to right view when orientation changes.
The text was updated successfully, but these errors were encountered: