2011-07-29 81 views

回答

0
+0

是的,这是可能的,但情况是,当APP用户陶斯接触,他会问他你是否属于英国或者不属于他。他选择是的,我们应该在现有联系人前加49,但不应该干扰b本地联系人。联系人列表必须相同。但在APP中,只有我们必须将...添加+49 ... – user857280

+0

如果您彻底研究链接,则会找到访问联系人并将号码添加到它只在您的应用程序内向用户显示。但是,您需要自己的观点才能显示联系人。你将无法使用人员选择器。或者你可以复制你的应用程序的地址簿,并添加你想要的前缀。 –

+0

我没有在应用程序中保留任何联系人。我正在访问本地联系人。我想在APP中打电话时加上+49。结束通话后,该号码不应该改变... – user857280

1
-(void)showPersonViewController:(NSString *)nameInContact 
{ 
    // Fetch the address book 
    ABAddressBookRef addressBook = ABAddressBookCreate(); 
    // Search for the person in the address book 
    NSArray *people = (NSArray *)ABAddressBookCopyPeopleWithName(addressBook, CFSTR(nameInContact)); 
    // Display the information if found in the address book 
    if ((people != nil) && [people count]) 
    { 
     ABRecordRef person = (ABRecordRef)[people objectAtIndex:0]; 
     ABPersonViewController *picker = [[[ABPersonViewController alloc] init] autorelease]; 
     picker.personViewDelegate = self; 
     picker.displayedPerson = person; 
     // Allow users to edit the person’s information 
     picker.allowsEditing = YES; 
     [self.navigationController pushViewController:picker animated:YES]; 
    } 
    else 
    { 
     // Show an alert if the person is not in Contacts 
     UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Error" 
                 message:[NSString stringWithFormat:@"Could not find %@ in the Contacts application", nameInContact] 
                 delegate:nil 
               cancelButtonTitle:@"Cancel" 
               otherButtonTitles:nil]; 
     [alert show]; 
     [alert release]; 
    } 

    [people release]; 
    CFRelease(addressBook); 
} 
相关问题