Permalink
Browse files

[UI] Show networkActivityIndicator for TTWebViewController. Closes #152

  • Loading branch information...
1 parent 1e0a321 commit f348ed311ce928d29a60b0acb4846e5540c96a60 @jwang jwang committed Jan 21, 2011
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/Three20UI/Sources/TTWebController.m
@@ -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];
@@ -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];

0 comments on commit f348ed3

Please sign in to comment.