Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/iphone/38.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Iphone 地址字段不显示值_Iphone - Fatal编程技术网

Iphone 地址字段不显示值

Iphone 地址字段不显示值,iphone,Iphone,虽然显示名称,但地址字段未从webservice获得其值。 我正在使用ABPersonViewController提供地址簿所具有的外观 NSString *strAddress = [[NSString alloc]initWithString:aBook.Address]; ABRecordSetValue(person, kABPersonAddressProperty,strAddress, NULL); NSString*strAddress=[[NSString alloc]

虽然显示名称,但地址字段未从webservice获得其值。 我正在使用ABPersonViewController提供地址簿所具有的外观

NSString *strAddress = [[NSString alloc]initWithString:aBook.Address]; ABRecordSetValue(person, kABPersonAddressProperty,strAddress, NULL); NSString*strAddress=[[NSString alloc]initWithString:aBook.Address]; ABRecordSetValue(person、KabPersonalAddressProperty、StradAddress、NULL); 救命

修改代码:

ABMutableMultiValueRef multiAddress = ABMultiValueCreateMutable(kABMultiDictionaryPropertyType); NSMutableDictionary *addressDictionary = [[NSMutableDictionary alloc] init]; [addressDictionary setObject:strAddress forKey:(NSString *) kABPersonAddressStreetKey]; ABMultiValueAddValueAndLabel(multiAddress, addressDictionary, kABHomeLabel, NULL); ABRecordSetValue(person, kABPersonAddressProperty, multiAddress, NULL); CFRelease(multiAddress); ABMutableMultiValueRef multiAddress=ABMultiValueCreateMutable(kABMultiDictionaryPropertyType); NSMutableDictionary*addressDictionary=[[NSMutableDictionary alloc]init]; [addressDictionary setObject:StradAddress forKey:(NSString*)KabPersonalAddressStreetKey]; ABMultiValueAddValueAndLabel(多地址、地址字典、kABHomeLabel、NULL); ABRecordSetValue(person,KabPersonalAddressProperty,多地址,NULL); CFRelease(多地址);
添加此项-确保获得值-NSLog(@“StradAddress is%@”,StradAddress)@mike现在的工作是更新上面的代码!!!