Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/116.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios 重试直到成功_Ios_Xcode_Reactive Cocoa_Racsignal - Fatal编程技术网

Ios 重试直到成功

Ios 重试直到成功,ios,xcode,reactive-cocoa,racsignal,Ios,Xcode,Reactive Cocoa,Racsignal,我有RACObserve块,我想重试调用,直到它成功返回。因此,它不会显示错误消息,但会重试获取。 谢谢你的帮助 [[[[RACObserve(self, currentLocation) ignore:nil] flattenMap:^(CLLocation *newLocation) { return [RACSignal merge:@[ [self up

我有RACObserve块,我想重试调用,直到它成功返回。因此,它不会显示错误消息,但会重试获取。 谢谢你的帮助

    [[[[RACObserve(self, currentLocation)
        ignore:nil]

       flattenMap:^(CLLocation *newLocation) {
           return [RACSignal merge:@[
                                     [self updateCurrentConditions],
                                     [self updateDailyForecast],
                                     [self updateHourlyForecast]
                                     ]];

       }] deliverOn:RACScheduler.mainThreadScheduler]

     subscribeError:^(NSError *error) {
         [TSMessage showNotificationWithTitle:@"Error"
                                     subtitle:@"There was a problem fetching the latest weather."
                                         type:TSMessageNotificationTypeError];
     }];

在订阅之前,在调用链的最后一点使用方法
重试