Storyboard size problem

Discussion in 'iOS Programming' started by DevDave, Jan 4, 2016.

Tags:
  1. DevDave macrumors newbie

    Joined:
    Jan 4, 2016
    #1
    Hi, I am trying to teach myself how to make apps and I run into a problem I can't seem to figure out. Here it is. I am writting an app for the iPhone 6. But the "infered" size in the storyboard is 320 by 568, wich is for the iphone 5. This is giving me issues as when I run it on the simulator for iphone 6 there is a white gap all around my app. If I manually set the size from infered to 4.7 then the storyboard is fine and the simulator is fine too, but when I run the app on the device the image is too big for the screen (so the opposite probelm) I have checked online for the answer and most posts seem to suggest that by adding a storyboard launch image it should solve the issue. I have done this, but the infered storyboard size is still the iphone5. Is there a way to solve this? Thanks
     
  2. AxoNeuron macrumors 65816

    AxoNeuron

    Joined:
    Apr 22, 2012
    Location:
    The Left Coast
    #2
    You will want to learn about auto layout.
     
  3. JWalker1995 macrumors regular

    Joined:
    Mar 5, 2011
    #3
    Is the white gap on the right side and bottom?
     
  4. 1458279 Suspended

    1458279

    Joined:
    May 1, 2010
    Location:
    California
    #4
    Learning iOS dev keeps getting harder and harder. There's more sizes and APIs than before.

    There's Autolayout, the size API as well as constraints. It takes a good while to learn all these things. I'd find a modern book that goes into the details of these things.
     
  5. DevDave thread starter macrumors newbie

    Joined:
    Jan 4, 2016
    #5
    Yes, right side and bottom. What I would like is to set it so that the window is inferred at 4.7
     
  6. JWalker1995 macrumors regular

    Joined:
    Mar 5, 2011
    #6
    Yes you need to look at Auto Layout, I'm presuming you haven't set any constraints on the storyboard?
     
  7. DevDave thread starter macrumors newbie

    Joined:
    Jan 4, 2016
    #7
    I understand, but I would like to do it turning off auto layout and size classes. I want to be able to do it without using them. The thing that puzzles me is that the window of the iPhone is 320 by 568 which is iPhone 5, that's even before we start talking about constraints and white space around it. My question is, is there a way (I presume there must be) to get Xcode to present an iPhone 6 sized storyboard as the "inferred" size. People say it's by adding a storyboard as a launch image but i've tried that and it doesn't solve anything. Thanks
     
  8. JWalker1995 macrumors regular

    Joined:
    Mar 5, 2011
    #8
    So what your saying is when you make a new UIViewController you want it to size to iPhone 6 automatically on the storyboard? then no, I don't believe that's possible.
     

Share This Page