在线观看不卡亚洲电影_亚洲妓女99综合网_91青青青亚洲娱乐在线观看_日韩无码高清综合久久

鍍金池/ 問答/C  iOS/ ios presentViewController 后 vc里 狀態(tài)欄 是灰色的

ios presentViewController 后 vc里 狀態(tài)欄 是灰色的

我用presentViewController 加入了一個(gè)vc
但是 狀態(tài)欄是灰色的,不知道為啥,如圖
圖片描述

我在網(wǎng)上找了個(gè)方法,,但是不起作用

WebViewController *vc = [self.storyboard instantiateViewControllerWithIdentifier:@"wbView"];
vc.modalPresentationStyle = UIModalPresentationOverFullScreen;
vc.url=urlString;
[self presentViewController:vc animated:true completion:nil];

回答
編輯回答
溫衫

問題就在 webView 了,那個(gè)灰色是 UIWebView 默認(rèn)的底色。然后你是全屏的,UIWebView 自動(dòng)加了個(gè) topInset,防止被狀態(tài)欄擋住。
解決方法:

  1. 設(shè)置你的 VC.automaticallyAdjustsScrollViewInsets = NO; VC.edgesForExtendedLayout = UIRectEdgeAll
  2. 或者,你應(yīng)該被 VC 包在 UINavigationController 中
2017年7月9日 04:30