0

i have an webView and my problem is that the status bar overlaps my webView.

i already tried the top 2 solutions of this topic:

but it didnt work. Status bar and navigation bar appear over my view's bounds in iOS 7

this is how it looksenter image description here

any1 has an idea?

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
Community
  • 1
  • 1
zooky
  • 171
  • 1
  • 4
  • 16
  • Please show the code you actually used from the provided link. – Bista Mar 18 '15 at 09:08
  • Do you use auto layout? – iOSfleer Mar 18 '15 at 09:16
  • - (void)viewDidLoad { [super viewDidLoad]; NSString *fullURL = @"url here"; 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. } – zooky Mar 18 '15 at 09:34

1 Answers1

0

You should add this value to plist: "View controller-based status bar appearance" and set it to "NO". Probably, it is not in your plist file then you should create it.

then type basically: [[UIApplication sharedApplication] setStatusBarHidden:YES]; in viewDidLoad method or somewhere else

How to hide iOS 7 status bar

Community
  • 1
  • 1
miletliyusuf
  • 982
  • 1
  • 10
  • 12