Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- - (void)viewDidLoad
- {
- [super viewDidLoad];
- _webView = [[UIWebView alloc] init];
- _webView.delegate = self;
- NSURLRequest *request = [[NSURLRequest alloc] initWithURL:_url];
- [_webView loadRequest:request];
- }
- NSDictionary *dictionary = [[NSDictionary alloc] initWithObjectsAndKeys:@"Mozilla/5.0 (iPhone; CPU iPhone OS 5_0 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko) Version/5.1 Mobile/9A334 Safari/7534.48.3", @"UserAgent", nil];
- [[NSUserDefaults standardUserDefaults] registerDefaults:dictionary];
- -(void)connection:(NSURLConnection *)connection didReceiveResponse:(NSURLResponse *)response
- _webView = [[UIWebView alloc] initWithFrame:self.view.frame]; //give a proper Rect value
- _webView.delegate = self;
- NSURLRequest *request = [[NSURLRequest alloc] initWithURL:_url];
- [_webView loadRequest:request];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement