Monday, June 3, 2013

UIWebView stopLoading example in Objective C (iOS).


UIWebView stopLoading

Stops the loading of any web content managed by the receiver.

- (void)stopLoading

Discussion of [UIWebView stopLoading]
Stops any content in the process of being loaded by the main frame or any of its children frames. Does nothing if no content is being loaded.

UIWebView stopLoading 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 stopLoading].
TRy with, First call stopLoading then reload on your UIWebView instance.

[myWebView  stopLoading ];
[myWebView  reload];

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

End of UIWebView stopLoading example article.