Monday, June 3, 2013

UIWebView reload example in Objective C (iOS).


UIWebView reload

Reloads the current page.

- (void)reload

UIWebView reload example.
- (void)viewDidAppear:(BOOL)animated{
    [super viewDidAppear:animated];
    [webView  stopLoading ];
    [webView reload];
}
or

NSURL *theURL = [NSURL URLWithString:@"http://www.OurLovingMother.org/Mobile.aspx"];
    [webView loadRequest:[NSURLRequest requestWithURL:theURL]];
}

Example of [UIWebView reload].
TRy with, First call stopLoading then reload on your UIWebView instance.

[myWebView  stopLoading ];
[myWebView  reload];

UIWebView reload example.
[webView loadRequest: [NSURLRequest requestWithURL:[NSURL URLWithString:@"http://www.facebook.com"]]];
[webView  stopLoading ];
[webView reload];

End of UIWebView reload example article.