Is an iphones screen resolution 320×460, or 320×480?

I’m so confused. I don’t have a status bar, and I don’t know how to make my scroll view’s dimensions. Is it 320 x 480, or 320 x 460? Because when I drag it out onto storyboard and it fills the entire screen it says it is 320 x 460, but then when I add subviews to it they get positioned strangely and so that it’s like the views are 20 pixels short or something.

EDIT: I’m just a little confused because when my status bar goes away, it doesn’t re adjust the view size, it just makes the view 20 pix shorter, which doesn’t really make sense, right? Shouldn’t it make it 20 pix longer instead of just cutting off 20 pix?

  • How to uninstall PhoneGap from my project and machine
  • How can I determine programmatically that my app is running on an iPhone, iPad or iPhone 4?
  • iPad in-house App distribution through App Store
  • Custom button not displaying in Today Extension
  • Unable to Archive Xcode Project: No such file or directory
  • Install ios 5 simulator to xcode 5.1?
  • 3 Solutions Collect From Internet About “Is an iphones screen resolution 320×460, or 320×480?”

    The iPhone screen is 320×480 definitely.

    The reason you’re having an issue in storyboards is there are multiple places to tell it you don’t have a status bar. You need to track down all of them (3?) and make sure it says no status bar.

    The most common problem is that you have your status bar either on or inferred in one of your earlier viewControllers while you’ve exclusively set it to off in a nested viewController. This causes it not to have a status bar but show itself as 460 pixels high. as you can see in the image its clearly 20 pixels shorter. Thats because the segue is telling it that when its presented to present it “under” the status bar even though it doesn’t have one itself. If I were to change the segue from a modal to push the problem goes away. Or if I set the first viewController to have no statusBar as well the problem goes away. Also note that Xcode can require a restart to properly update its graphical storyboard in some instances.

    enter image description here

    One More Thing

    Also setting either in code or storyboards to hide the status bar isn’t the same as setting the UIStatusBarHidden to YES in your .info file. If you left it to no while hiding it everywhere else your default.png will be clipped and show the status bar while loading then it will disappear once the app finishes launching. So be sure to hide it there as well for a consistent user experience.

    Code

    - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
    {
        // Override point for customization after application launch.
    
        [application setStatusBarHidden:YES];
    }
    

    it is 320 x 480, the 20 pixels you are seeing is the status bar, if you are planning on hiding the status bar and want to match the size in Interface Builder, you can go to IB to Simulated Metrics -> Status Bar and select None.

    This will not affect the real size of the view in your view controller, though as it will resize itself to fit in the size even if you set the view to be 320 x 480, the view controller will resize itself to 320 x 460 if there is a status bar and 320 x 418 if there is also a navigation bar.

    I am a bit out of iPhone-programming, but this 20px should be the upper border, where you can see the carrier and strength etc.