When my uiscrollview with paging enabled gets rotated, it works fine, but it still thinks the images are the same width, so the pages don’t take up the full page. so can i tell it the “pages” are now as wide as the height?
When my uiscrollview with paging enabled gets rotated, it works fine, but it still
Share
You can enable autoresizing subviews for the
UIScrollView, like for any other view. Of course, you need to set appropriate autoresizing masks for each of your subviews. This will take care of resizing, repositioning, etc. However, the contentSize property isn’t automatically adjusted, so you need to take care of that yourself, for example inlayoutSubviews. I’ve done all of this before, it’s a little fiddly, but doable as a subclass of the scroll view. I’ve actually publicly released this autoresizing scroll view, but it’s commercially licensed, and I’m not sure what SO policy is on that kind of thing, so I won’t link to it.