阅读背景:

使用带有循环的Alamofire根据Tableview计数发送多个请求

来源:互联网 

I am trying to send multiple requests based on the tableview count using a for loop. I know Alamofire is asynchronous. The problem I have is when I use a loop to call the function, the x value becomes out of sync with the response since it is asynchronous. What is the best approach to essentially guard the int value passed into the POST request until the completion handler returns a value. Would a synchronous approach be best or is there a way to asynchronously pass multiple values? If so, how would I implement?I am trying to send multiple requests based on




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: