File tree 1 file changed +6
-2
lines changed
1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -162,7 +162,9 @@ - (void) sendRequest:(__weak NSDictionary * _Nullable )options
162
162
163
163
// network status indicator
164
164
if ([[options objectForKey: CONFIG_INDICATOR] boolValue ]) {
165
- [[UIApplication sharedApplication ] setNetworkActivityIndicatorVisible: YES ];
165
+ dispatch_async (dispatch_get_main_queue (), ^{
166
+ [[UIApplication sharedApplication ] setNetworkActivityIndicatorVisible: YES ];
167
+ });
166
168
}
167
169
}
168
170
@@ -367,7 +369,9 @@ - (void) URLSession:(NSURLSession *)session task:(NSURLSessionTask *)task didCom
367
369
NSString * respStr;
368
370
NSString * rnfbRespType;
369
371
370
- [[UIApplication sharedApplication ] setNetworkActivityIndicatorVisible: NO ];
372
+ dispatch_async (dispatch_get_main_queue (), ^{
373
+ [[UIApplication sharedApplication ] setNetworkActivityIndicatorVisible: NO ];
374
+ });
371
375
372
376
if (error) {
373
377
errMsg = [error localizedDescription ];
You can’t perform that action at this time.
0 commit comments