Frage

I've looked and searched and there is a lot of discussion regarding the new way the status bar is handled in ios7. I've found solutions to the problem of extra space between status bar and content.

But my problem is not that there is extra space between the status bar and the content, it's that the status bar is not at the top of the iPhone screen. The status bar is perfectly aligned with my view, there is no overlap and no transparency problem, it's that there is extra space between the status bar and the top of the iphone screen. (cannot post a picture).

I can't find why this is happening. It used to work prior to moving to ios7. Here is what I use to create my view:

@window = UIWindow.alloc.initWithFrame(UIScreen.mainScreen.bounds)
@window.styleMode = PXStylingNormal
@window.makeKeyAndVisible

@rdata = RamanData.new(532.00, 580.00, 1555.61)
@bdata = BandwidthData.new(532.0, 48.0, 0)
@controller = RamanController.alloc.initWithData(@rdata, @bdata)

@nav_controller = UINavigationController.alloc.initWithRootViewController(@controller)
@window.rootViewController = @nav_controller

Then in my viewDidLoad I use this:

self.setTitle("Some title")
self.edgesForExtendedLayout= UIRectEdgeAll
self.automaticallyAdjustsScrollViewInsets= false

Any help would be appreciated. This is with the latest versions of Rubymotion (2.22) and Pixate (2.0.1).

War es hilfreich?

Lösung

Add a file called Default-568h@2x.png to your resources folder with dimensions of 640x1136. Without this file, iOS crops the window to fit a 3.5" screen on a 4" device.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top