Created
December 18, 2020 18:19
-
-
Save jscalo/8775d519ef2728072d25dfba34b178ff to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
override func layoutSubviews() { | |
super.layoutSubviews() | |
let scale = bounds.width / lastBounds.width | |
scrollView.recenterForScale(scale) | |
lastBounds = bounds | |
updateScrollViewSize() | |
update() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment