iosobjective-ccocoa-touchuiwebviewlibrary-project

Cocoa Touch library with UIApplication and UIWebView


WebView google site is not loaded in this scenario

enter image description here

While we tried to use , its get loaded...

enter image description here

Can anyone guide me how to make the first code to be worked inside cocoa touch library project


Solution

  • Use delegates to achieve webview from static library to application

        [[UIApplication sharedApplication] setStatusBarHidden:YES];
        // UIApplication * app = [UIApplication sharedApplication];
        UIWebView *web=[[UIWebView alloc]initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height)];
    
        web.layer.borderWidth = 1;
        web.layer.borderColor = [[UIColor redColor] CGColor];
       // NSURLRequest * req = [[NSURLRequest alloc]initWithURL:[NSURL URLWithString:@"https://www.yahoo.com"]];
    
      [web loadRequest:req];
     [self.adView addSubview:web];
    

    Concentrate on adView ... here you will get stuck...