2

使用下面的代码,我提出了一个人员选择器,以便用户可以选择电话或电子邮件地址。我已将可显示属性设置为电子邮件和电话,但“铃声”属性在电话组中可见。鉴于此 Person 选择器实例的目的,在此处显示 Ringtone 选项绝对没有意义。有人知道如何在电话组中摆脱它吗?

ABPeoplePickerNavigationController *picker = [[ABPeoplePickerNavigationController alloc] init];

NSArray *propertiesToShow = [NSArray arrayWithObjects:[NSNumber numberWithInt:kABPersonEmailProperty],
                              [NSNumber numberWithInt:kABPersonPhoneProperty], nil];

[选择器 setDisplayedProperties:propertiesToShow];

[picker setPeoplePickerDelegate:self];

[self presentModalViewController:picker animated:YES];
[选择器发布];

4

0 回答 0