NJKWebViewProgress icon indicating copy to clipboard operation
NJKWebViewProgress copied to clipboard

Why the web view is below the navigation bar if we don't use storyboard?

Open chenweiyj opened this issue 11 years ago • 1 comments

The demo app which use storyboard to create the UIWebView runs fine as follows.

right

However, if I change the UIWebView to be created programmatically, some part of the view is below the navigation bar which cannot be seen. Following image shows the result.

wrong

Following code shows how the UIWebView is created.

@implementation ViewController
{
//    IBOutlet __weak UIWebView *_webView;
    UIWebView *_webView;
    NJKWebViewProgressView *_progressView;
    NJKWebViewProgress *_progressProxy;
}

- (void)viewDidLoad
{
    [super viewDidLoad];
    _webView = [[UIWebView alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
    [self.view addSubview:_webView];
    ......
}

chenweiyj avatar Nov 29 '14 03:11 chenweiyj

how did you implement the NJKWebViewProgressView into the UIWebView programmatically? I can't seem to implement it into my project or Navigation Bar. Can you help?

BrandDev avatar Dec 12 '14 07:12 BrandDev