5 ms·
That page doesn't mention blocks at all, though. Apple themselves use the (id value, NSError *error) completion block style with NSURLSession: https://developer
by jurip 12y ago
That page doesn't mention blocks at all, though. Apple themselves use the (id value, NSError *error) completion block style with NSURLSession: https://developer.apple.com/library/ios/documentation/Foundation/Reference/NSURLSession_class/Introduction/Introduction.html#//apple_ref/occ/instm/NSURLSession/dataTaskWithURL:completionHandler%3A https://developer.apple.com/library/ios/documentation/Founda...
It makes sense with blocks where you have actual multiple values you can pass in without futzing with pointers to pointers.
- mbenjaminsmith 12y agoWhat's strange about that is they don't (at least the few methods that I looked at) define the behavior they're using for "combined" callbacks. Should you check for a non-nil NSError? Is an NSData parameter going to be nil on error?