Before starting to sprout code, I want to know if I have a conceptual mistake, since I am new to Swift and Xcode. I have a scrollview that resizes properly and covers the entire screen´s witch when the screen orientation changes. This is my view hierarchy: rootView > scrollView > containerView > Textboxes, and so on... However, as soon as I scroll, the contents of the ScrollView return to the sizes and positions that they seemed to have during portrait mode. Aren't the contents of a UIScrollview supposed to Autogrow/shrink along with its contener? Is there a magic setting that I´m skipping in order to achieve such functionality?? Thanks in advance.
Asked
Active
Viewed 493 times
0
-
I guess not. You have to use auto layout or manual calcuate the frame and content size after you rotate your device. – Wingzero Jun 08 '15 at 10:08
-
Hello @Wingzero gundam, I suspected so. I detect rotation and resize the views programmatically. So far so good. But when I scroll, the views shrink back, so again, I forced view to their correct size inside the didScroll method. But that results in an ugly flickering effect, as the views are resized to their proper size. I dont know why do the views shrink in the first place just because I scroll. – Josh Jun 08 '15 at 10:20
-
when you rotate, the height and width flipped over, are you taking your width as height in another orientation? You may need provide some code. all just try google – Wingzero Jun 08 '15 at 10:26
-
for example,http://stackoverflow.com/questions/13430379/uiscrollview-content-size-when-orientation-changes – Wingzero Jun 08 '15 at 10:28