I have an app for iPad, and in one of my views I use UIScrollView and UIPageControl to navigate between arrays of views. when my simulator is in “Portrait” mode, there is no problem, but when I turn it to “Landscape” just down, scrolling appears and I see only about 30 per 100 of the whole image. How can I fix this situation, can anyone help?
EDIT: I am dynamically adding some button sub-adjustments to the preview that I added to Scrollview, can someone give an idea on how to determine the orientation of the device and solve frames. I need something like pseudo below:
if(device_orientation == landscape){ subButton.frame=....; textfield.frame=...; } else{ subButton.frame=....; textfield.frame=...;} }
I tried, but I got a black screen.
EDIT-2 I used the interface designer for some views, and there are several dynamically created views. I did a little work with the Autoresizing properties in the .xib file, and now it looks perfect, but dynamic (they are all objects of the UIButton subclass). Do not respond to any code (resize, bacground color-photo ect ..)
source share