Advertisement
Guest User

Untitled

a guest
Feb 12th, 2016
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.29 KB | None | 0 0
  1. - (void)viewDidLoad
  2. {
  3. [super viewDidLoad];
  4. [self setUrlAddress:@"http://google.com.pk"];
  5. // Do any additional setup after loading the view from its nib.
  6. NSURL *url = [NSURL URLWithString:self.urlAddress];
  7. //URL Requst Object
  8. NSURLRequest *requestObj = [NSURLRequest requestWithURL:url];
  9. //Load the request in the UIWebView.
  10. [self.webView setScalesPageToFit:YES];
  11. [self.webView loadRequest:requestObj];
  12.  
  13.  
  14. }
  15.  
  16. - (void)webViewDidStartLoad:(UIWebView *)webView{
  17. [appDelegate showActivityView:self.view];
  18. }
  19.  
  20. - (void)webViewDidFinishLoad:(UIWebView *)webView{
  21. [appDelegate hideActivityView];
  22. }
  23.  
  24. NSString *currentURL = [webView stringByEvaluatingJavaScriptFromString:@"window.location.href"];
  25.  
  26. NSSTRing * currentURL = webView.request.URL.absoluteString;
  27.  
  28. - (void)viewDidLoad
  29. {
  30. [super viewDidLoad];
  31. NSString *urlAddress = [NSString stringWithFormat:@"http://www.google.com/pk];
  32. //Create a URL object.
  33. NSURL *url = [NSURL URLWithString:urlAddress];
  34. //URL Requst Object
  35. NSURLRequest *requestObj = [NSURLRequest requestWithURL:url];
  36. //Load the request in the UIWebView.
  37. [webView loadRequest:requestObj];
  38.  
  39. }
  40.  
  41. - (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement