AFHTTPRequestOperationManager return data in block
问题 I created an APIController in my application that has several methods that call specific api urls and return a model object populated with the result of the api call. The api works with json and up to now my code looks like the following: //Definition: - (MyModel *)callXYZ; - (MyModel *)callABC; - (MyModel *)call123; //Implementation of one: - (MyModel *)callXYZ { //Build url and call with [NSData dataWithContentsOfURL: url]; //Create model and assign data returned by api return model; } Now