diff --git a/objective-c/route_guide/ViewControllers.m b/objective-c/route_guide/ViewControllers.m index ec40f72..cfc3338 100644 --- a/objective-c/route_guide/ViewControllers.m +++ b/objective-c/route_guide/ViewControllers.m @@ -32,9 +32,9 @@ */ #import -#import -#import #import +#import +#import static NSString * const kHostAddress = @"http://localhost:50051"; @@ -131,7 +131,8 @@ static NSString * const kHostAddress = @"http://localhost:50051"; rectangle.hi.longitude = -745E6; NSLog(@"Looking for features between %@ and %@", rectangle.lo, rectangle.hi); - [client listFeaturesWithRequest:rectangle handler:^(BOOL done, RTGFeature *response, NSError *error) { + [client listFeaturesWithRequest:rectangle + eventHandler:^(BOOL done, RTGFeature *response, NSError *error) { if (response) { NSLog(@"Found feature at %@ called %@.", response.location, response.name); } else if (error) { @@ -211,7 +212,8 @@ static NSString * const kHostAddress = @"http://localhost:50051"; RTGRouteGuide *client = [[RTGRouteGuide alloc] initWithHost:kHostAddress]; - [client routeChatWithRequestsWriter:notesWriter handler:^(BOOL done, RTGRouteNote *note, NSError *error) { + [client routeChatWithRequestsWriter:notesWriter + eventHandler:^(BOOL done, RTGRouteNote *note, NSError *error) { if (note) { NSLog(@"Got message %@ at %@", note.message, note.location); } else if (error) {