Showing
1 changed file
with
6 additions
and
2 deletions
@@ -4736,14 +4736,18 @@ static NSOperationQueue *sharedQueue = nil; | @@ -4736,14 +4736,18 @@ static NSOperationQueue *sharedQueue = nil; | ||
4736 | + (void)showNetworkActivityIndicator | 4736 | + (void)showNetworkActivityIndicator |
4737 | { | 4737 | { |
4738 | #if TARGET_OS_IPHONE | 4738 | #if TARGET_OS_IPHONE |
4739 | - [[UIApplication sharedApplication] setNetworkActivityIndicatorVisible:YES]; | 4739 | + dispatch_async(dispatch_get_main_queue(), ^{ |
4740 | + [[UIApplication sharedApplication] setNetworkActivityIndicatorVisible:YES]; | ||
4741 | + }); | ||
4740 | #endif | 4742 | #endif |
4741 | } | 4743 | } |
4742 | 4744 | ||
4743 | + (void)hideNetworkActivityIndicator | 4745 | + (void)hideNetworkActivityIndicator |
4744 | { | 4746 | { |
4745 | #if TARGET_OS_IPHONE | 4747 | #if TARGET_OS_IPHONE |
4746 | - [[UIApplication sharedApplication] setNetworkActivityIndicatorVisible:NO]; | 4748 | + dispatch_async(dispatch_get_main_queue(), ^{ |
4749 | + [[UIApplication sharedApplication] setNetworkActivityIndicatorVisible:NO]; | ||
4750 | + }); | ||
4747 | #endif | 4751 | #endif |
4748 | } | 4752 | } |
4749 | 4753 |
-
Please register or login to post a comment