Skip to content

Commit

Permalink
[UI] Show networkActivityIndicator for TTWebViewController. Closes #152
Browse files Browse the repository at this point in the history
  • Loading branch information
jwang committed Jan 21, 2011
1 parent 1e0a321 commit f348ed3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Three20UI/Sources/TTWebController.m
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,7 @@ - (void)webViewDidStartLoad:(UIWebView*)webView {
if (!self.navigationItem.rightBarButtonItem) {
[self.navigationItem setRightBarButtonItem:_activityItem animated:YES];
}
[UIApplication sharedApplication].networkActivityIndicatorVisible = YES;
[_toolbar replaceItemWithTag:3 withItem:_stopButton];
_backButton.enabled = [_webView canGoBack];
_forwardButton.enabled = [_webView canGoForward];
Expand All @@ -326,7 +327,7 @@ - (void)webViewDidStartLoad:(UIWebView*)webView {
///////////////////////////////////////////////////////////////////////////////////////////////////
- (void)webViewDidFinishLoad:(UIWebView*)webView {
TT_RELEASE_SAFELY(_loadingURL);

[UIApplication sharedApplication].networkActivityIndicatorVisible = NO;
self.title = [_webView stringByEvaluatingJavaScriptFromString:@"document.title"];
if (self.navigationItem.rightBarButtonItem == _activityItem) {
[self.navigationItem setRightBarButtonItem:nil animated:YES];
Expand Down

0 comments on commit f348ed3

Please sign in to comment.