2013-10-04 59 views
-1

iOS7上的狀態欄有不一致的行爲。有時節目如:爲顯示在第一張圖調整iOS7狀態欄

enter image description here

我的行爲:enter image description here

雖然有時視圖顯示爲。

+1

問題是? – Sulthan

+2

你需要設置你的控制Y位置20px..every time,每一頁都是這樣。 –

+0

@Sulthan,問題是保持視圖始終如第一張圖所示。 – Zubair

回答

1

在您的viewDidLoad

if ([self respondsToSelector:@selector(setEdgesForExtendedLayout:)]) 
{ 
    self.edgesForExtendedLayout = UIRectEdgeNone; 
} 
+0

已經添加了這段代碼,但現在工作 – Zubair

-1

添加該代碼這將工作,如果你不使用導航控制器

didFinishLaunchingWithOptions添加該代碼方法

if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 7) 
{ 

    [application setStatusBarStyle:UIStatusBarStyleLightContent]; 

    self.window.clipsToBounds =YES; 

    self.window.frame =  CGRectMake(0,20,self.window.frame.size.width,self.window.frame.size.height-20); 
} 

中進行更改您的plist添加基於視圖控制器的狀態欄外觀 enter image description here