We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
iOS convention has a single completion handler for async calls, instead of a success and failure callback.
[uberKit getPriceForTripWithStartLatitude:START_LAT startLongitude:START_LONG endLatitude:END_LAT endLongitude:END_LONG success:^(NSArray *prices) failure:^(NSError *error, NSHTTPURLResponse *response)];
Would become:
[uberKit getPriceForTripWithStartLatitude:START_LAT startLongitude:START_LONG endLatitude:END_LAT endLongitude:END_LONG withCompletionHandler:^(NSArray *prices, NSError *err)];
If there is an NSError, then the message in the error can be displayed, otherwise the prices array can be accessed.
I believe this would clean the code and make it concise.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
iOS convention has a single completion handler for async calls, instead of a success and failure callback.
[uberKit getPriceForTripWithStartLatitude:START_LAT startLongitude:START_LONG endLatitude:END_LAT endLongitude:END_LONG success:^(NSArray *prices)
failure:^(NSError *error, NSHTTPURLResponse *response)];
Would become:
[uberKit getPriceForTripWithStartLatitude:START_LAT startLongitude:START_LONG endLatitude:END_LAT endLongitude:END_LONG withCompletionHandler:^(NSArray *prices, NSError *err)];
If there is an NSError, then the message in the error can be displayed, otherwise the prices array can be accessed.
I believe this would clean the code and make it concise.
The text was updated successfully, but these errors were encountered: