2014-02-14 66 views
0

我看過搜索過,關於在ios7中處理狀態欄的新方式有很多討論。我已經找到了狀態欄和內容之間額外空間問題的解決方案。狀態欄不在頂部

但我的問題不是狀態欄和內容之間有額外的空間,而是狀態欄不在iPhone屏幕的頂部。狀態欄與我的視圖完全一致,沒有重疊和透明度問題,這是狀態欄和iphone屏幕頂部之間有額外的空間。 (不能發佈圖片)。

我找不到爲什麼會發生這種情況。它曾經在轉移到ios7之前工作。以下是我用來創建我的觀點:

@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 

然後在我viewDidLoad中我用這個:

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

任何幫助,將不勝感激。這是最新版本的Rubymotion(2.22)和Pixate(2.0.1)。

回答

1

將一個名爲[email protected]的文件添加到您的資源文件夾,尺寸爲640x1136。如果沒有此文件,iOS會裁剪窗口以適應4英寸設備上的3.5英寸屏幕。

+0

這工作就像一個魅力!非常感謝您花時間幫助我。非常感激! –

相關問題