views:

142

answers:

2

I was doing a sample app in ipad. I added about 4 to 5 imageviews to the left side of the view vertically. This view will appear when we select the corresponding entry in the splitviewcontroller. In ipad simulator too, all the images were loading and all are working fine in portrait orientation.

But when I rotate the simulator to landscape orientation, these imageviews doesnt appear where i placed them. Some of them overlapping each other, some have half of their part in the navigation bar and all. Has gone completely out of order. I am confused why is all this happening. Can anyone help me solve this issue?

A: 

Hi,Wolverine

this link will be very useful to your requirement.

http://icodeblog.com/2010/04/05/ipad-programming-tutorial-hello-world/

It contains the tutorial which you want to perform ( landscape + portrait )...

yakub_moriss
nope, no use. Fitting the image to a fullsize is ok in both orientations. I was just adding small imageview to the view. Then only this problem arises.
wolverine
+1  A: 

I have read your question very carefully. I understood the problem that you faced.

Here is the solution for you.

  • Open your viewControllers.xib.
  • Select your image views
  • Press Command + 3 ( for size inspector )
  • Go into 'View Size' section
  • 'concentrate' on auto resizing option
  • if there is no red lines below 'auto resizing', it will work as you want.

Hope, you understand what I want to say. If you found any difficulty in my answer, please add comment.

sugar
Hey, I did it and I undestood what u were trying to say. Thanks a lot man. Till now, I didnt knew it had such a funtionality too.
wolverine
Hi i too have the same problem but i am doing my project as programmaticaly without using .xib, so how can i solve this issue.Please do reply...
Cathy
sugar
Hi i have asked a new question and also placed the code on Autoresizing subviews programmatically. But no one replied. Please atleast you reply me.
Cathy