0
我無法得到這個代碼來設置提示設置提示:在的ABPeoplePickerNavigationController
// Create a PeoplePicker
ABPeoplePickerNavigationController *objPeoplePicker = [[ABPeoplePickerNavigationController alloc] init];
[objPeoplePicker setPeoplePickerDelegate:self];
// Customize colors
objPeoplePicker.topViewController.navigationController.navigationBar.tintColor = [UIColor colorWithRed:0.294 green:0.278 blue:0.247 alpha:1.0];
objPeoplePicker.topViewController.searchDisplayController.searchBar.tintColor = [UIColor colorWithRed:0.294 green:0.278 blue:0.247 alpha:1.0];
// Only display phone numbers
NSArray *displayedItems = [NSArray arrayWithObjects:[NSNumber numberWithInt:kABPersonPhoneProperty], nil];
objPeoplePicker.displayedProperties = displayedItems;
// Add a prompt
objPeoplePicker.navigationBar.topItem.prompt = @"Choose a contact to...";
// Show the picker
[self presentModalViewController:objPeoplePicker animated:YES];
「添加提示」一節似乎並沒有被設置的提示。有任何想法嗎?下面是一個輸出的截圖:
工作完美無瑕!謝謝! – 2010-10-12 15:34:04