ios - Abpersonviewcontroller showing no details -
i want show user contact page of person showing null . code below getting black contact page empty imagebox
abpersonviewcontroller *personcontroller = [[abpersonviewcontroller alloc] init]; nsdictionary *dic = [arraydata objectatindex:indexpath.row]; abrecordref ref = (__bridge abrecordref)[dic objectforkey:@"abrecordref"]; abaddressbookref addressbook = abaddressbookcreate(); nslog(@"%@",ref); abrecordid recid = abrecordgetrecordid(ref); personcontroller.displayedperson = abaddressbookgetpersonwithrecordid(addressbook, recid); personcontroller.displayedproperties = [nsarray arraywithobjects: [nsnumber numberwithint: kabpersonnicknameproperty], [nsnumber numberwithint: kabpersonphonemobilelabel], [nsnumber numberwithint:kabpersonaddressproperty], nil]; personcontroller.allowsediting = yes; personcontroller.personviewdelegate = self; personcontroller.navigationitem.backbarbuttonitem = [[uibarbuttonitem alloc] initwithtitle:@"return" style:uibarbuttonitemstyleplain target:self action:@selector(wapis)]; [[self navigationcontroller] pushviewcontroller:personcontroller animated:yes];
Comments
Post a Comment