2013-12-11 96 views
-4

我嘗試了以下建議的解決方案,它確實將我的屏幕向下移動,但狀態欄變爲不可見(黑色)。我也試過在AppDelegate中關閉視圖控制器基於狀態欄風格的info.plist然後setStatusBarStyle,但沒有運氣,我怎麼能得到的狀態欄中顯示,請幫助..iOS 7狀態欄重疊問題

if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 7) { 
    [[UIApplication sharedApplication] setStatusBarStyle: UIStatusBarStyleLightContent]; 
    self.window.clipsToBounds =YES; 
    self.window.frame = CGRectMake(0,20,self.window.frame.size.width,self.window.frame.size.height-20); 
    self.window.bounds = CGRectMake(0,0, self.window.frame.size.width,  self.window.frame.size.height); 
} 
+0

http://stackoverflow.com/questions/19428712/ios7-status-bar-issue檢查它 – Sport

回答

1
if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 7) { 
     [[UIApplication sharedApplication] setStatusBarStyle: UIStatusBarStyleLightContent]; 
     self.window.clipsToBounds =YES; 
     self.window.frame = CGRectMake(0,20,self.window.frame.size.width,self.window.frame.size.height-20); 
} 
else{ 
     self.window.frame = CGRectMake(0,0, self.window.frame.size.width, self.window.frame.size.height); 
} 

請嘗試使用這個。

+0

看不出我的代碼和你的區別..我說它不工作 – user3090948