Build & Profile -- wrong simulator

Discussion in 'iOS Programming' started by moonman239, Apr 10, 2014.

  1. moonman239 macrumors 68000

    Mar 27, 2009
    When I have my app profiled, the "retina-display iPad" simulator displays, but the regular iPad simulator is selected as the device in Xcode.

    This wouldn't be a problem if the "retina-display iPad" simulator didn't cut off some of my app's content at the top.
  2. Menneisyys2, Apr 14, 2014
    Last edited: Apr 14, 2014

    Menneisyys2 macrumors 603

    Jun 7, 2011
    Do you want your users to be able to run your iPhone app on your iPads? Then, make sure you just disable the status bar display for this particular view; then, the iOS7 iPad won't cut off that particular area. Just add the following (overridden) method to your VC:
    - (BOOL)prefersStatusBarHidden {
        return YES;

    1, many (e.g., at ) state you also need to add "View controller-based status bar appearance = YES" boolean to your Info.plist. That's not the case.

    2, many also state you need to give a call to [[UIApplication sharedApplication] setStatusBarHidden:YES]; That's not needed (and has no effect) either.

    3, the above solution is working independently of whether you have "Status bar style" and/or "Status bar is initially hidden" in your Info.plist. Nevertheless, if you do want to hide the uppermost 20/40 pixels when running on an iPad (as it'd be empty but not black), you may want to add Status bar style: Opaque black style.

    EDIT: this code will also properly work on pre-iOS7 iPads when running your apps (just tested on my iPad 1). There, there won't be a, for some people, annoying "vertical size changes" between the views with opaque black status bar (if you do add Status bar style: Opaque black style to avoid displaying non-black background colors without any content on the upper part of the emulated iPhone screen).

Share This Page