0

当 ABPeoplePicker 首次加载时,它会从您的地址簿顶部开始,搜索栏显示在顶部。但是,一旦用户与之交互,它就会加载到上次滚动到的位置。是否有命令或属性使其始终加载,以便顶部的搜索栏显示?

4

1 回答 1

0

找到了答案!

// Show the people picker
[self presentModalViewController:self.picker animated:YES];

// Force display the search bar and make the keyboard pop up
[self.picker.topViewController.searchDisplayController setActive:YES];
[self.picker.topViewController.searchDisplayController.searchBar becomeFirstResponder];
于 2012-02-11T16:20:15.557 回答