iPhone Landscape Issue

Discussion in 'iOS Programming' started by Wellington2k, Oct 1, 2011.

  1. Wellington2k macrumors regular

    Joined:
    Jun 4, 2011
    #1
    Hello. I've been trying to build a landscape oriented game, but every time I run the app anything I put in the xib file is flipped. Any help would be nice.
    Here is an image of my problem.
    Screen Shot 2011-10-01 at 9.20.30 AM.png
     
  2. Sykte macrumors regular

    Joined:
    Aug 26, 2010
    #2
    You will need to work with the struts and springs in the inspector "size". It's the one that looks like a ruler.

    Hope this helps.
     
  3. Wellington2k, Oct 1, 2011
    Last edited: Oct 1, 2011

    Wellington2k thread starter macrumors regular

    Joined:
    Jun 4, 2011
    #3
    Would I be changing it on the view or the button? I pretty sure it is the view.
    I just want to make sure.
    Are there specific levels it has to be on for it to work. I've tried a lot and still nothing.
     
  4. Sykte macrumors regular

    Joined:
    Aug 26, 2010
    #4
    Both.


    If your parent view is not setup properly it will throw the button off. The outer lines are struts, these hold your views into place. The inner lines are springs this tells your view to grow/shrink.
     
  5. Wellington2k thread starter macrumors regular

    Joined:
    Jun 4, 2011
    #5
    Why isn't this automatic? I worked in Xcode 3 with out all this trouble.
    I've noticed that it doesn't matter if in the xib I change the view from portrait to landscape.
    The same issue happens.
     
  6. Sykte macrumors regular

    Joined:
    Aug 26, 2010
    #6

    On your parent view set both springs. On your button only set the bottom strut.
     
  7. Wellington2k, Oct 2, 2011
    Last edited: Oct 10, 2011

    Wellington2k thread starter macrumors regular

    Joined:
    Jun 4, 2011
    #7
    I got it.
    There was an error in my code.
    Thanks for the help!
     

Share This Page