// Call System Address Book to follow two agent abpeoplepickernavigationcontrollerdelegate,uinavigationcontrollerdelegate Related classes are Abpeoplepickernavigationcontroller
// System Address Book comes with navigation bar, all to model out // Initialize Abpeoplepickernavigationcontroller *peoplepicker = [[Abpeoplepickernavigationcontroller alloc] init]; = self ; [Self Presentviewcontroller:peoplepicker animated:yes completion:nil];
#pragmamark-abpeoplepickernavigationcontrollerdelegate-(void) Peoplepickernavigationcontroller: (Abpeoplepickernavigationcontroller *) Peoplepicker Didselectperson: (abrecordref) Person property: (Abpropertyid) Property identifier: ( Abmultivalueidentifier) Identifier {abmultivalueref Valuesref=Abrecordcopyvalue (person, kabpersonphoneproperty); Cfindex Index=Abmultivaluegetindexforidentifier (Valuesref,identifier); //Phone numbercfstringref Telvalue=Abmultivaluecopyvalueatindex (Valuesref,index); //Full Namecfstringref Anfullname=abrecordcopycompositename (person); [Self Dismissviewcontrolleranimated:yes completion:^{ //(__bridge NSString *) Telvalue;//[NSString stringwithformat:@ "%@", Anfullname];NSLog (@"%@---%@", (__bridge NSString *) telvalue,[nsstring stringWithFormat:@"%@", Anfullname]); }]; }
IOS--Call system contacts