简体   繁体   English

iOS状态栏与webView重叠

[英]iOS status bar overlaps with webView

i have an webView and my problem is that the status bar overlaps my webView. 我有一个webView,我的问题是状态栏与我的webView重叠。

i already tried the top 2 solutions of this topic: 我已经尝试过该主题的前2个解决方案:

but it didnt work. 但是没有用。 Status bar and navigation bar appear over my view's bounds in iOS 7 状态栏和导航栏显示在iOS 7中我视图的边界上

this is how it looks 这是它的样子 在此处输入图片说明

any1 has an idea? any1有个主意吗?

my code: 我的代码:

#import "ViewController.h"

@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    NSString *fullURL = @"http://bda-bawue.de";
    NSURL *url = [NSURL URLWithString:fullURL];
    NSURLRequest *requestObj = [NSURLRequest requestWithURL:url];
    [_viewWeb loadRequest:requestObj];
    if ([self respondsToSelector:@selector(edgesForExtendedLayout)])
        self.edgesForExtendedLayout = UIRectEdgeNone;

}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end

You should add this value to plist: "View controller-based status bar appearance" and set it to "NO". 您应该将此值添加到plist:“基于视图控制器的状态栏外观”,并将其设置为“ NO”。 Probably, it is not in your plist file then you should create it. 可能它不在您的plist文件中,那么您应该创建它。

then type basically: [[UIApplication sharedApplication] setStatusBarHidden:YES]; 然后基本上输入: [[UIApplication sharedApplication] setStatusBarHidden:YES]; in viewDidLoad method or somewhere else 在viewDidLoad方法或其他地方

How to hide iOS 7 status bar 如何隐藏iOS 7状态栏

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM