objective c - Using the Yelp api in iOS -
i'm still new programming appreciated.
i'm trying use yelp api in new app i'm making. integrated api using example project provided yelp here: https://github.com/yelp/yelp-api (v2/objective c). question how access information sample program logs out. saves in nsdictionary can't figure out how access info can example display business's phone number in label in 1 of view controllers.
thanks
you access keys , objects other nsdictionary, example in ypapisample.m:
- (void)querytopbusinessinfoforterm: (nsstring *)term location: (nsstring *)location completionhandler: (void (^)(nsdictionary *topbusinessjson, nserror *error)) completionhandler { ... nsstring *phonenumber = [firstbusiness objectforkey:@"display_phone"]; nslog(@"phone number: %@",phonenumber); output:
phone number: +1-415-777-1413
Comments
Post a Comment