ABPeoplePickerView - 如何让它滚动到选定的记录?
我在 Mac OS X 应用程序中使用 ABPeoplePicker
。我连接了一个按钮,将所选记录更改为默认的“我”记录。
这工作正常,并且记录被选中,但是,我需要滚动表格才能查看所选记录。
NSTableView
具有 -scrollRowToVisible:(NSInteger)rowIndex
方法,但我找不到与 ABPeoplePickerView
类似的任何内容
有一条通知 ABPeoplePickerNameSelectionDidChangeNotification
当所选记录更改时发布,但我找不到将记录的属性插入视图的方法,以便使其可见。
I'm using the ABPeoplePicker
in a Mac OS X application. I've hooked up a button that changes the selected record to the default 'Me' record.
This works fine, and the record gets selected, but, I need to scroll the table to see the selected record.
NSTableView
has the -scrollRowToVisible:(NSInteger)rowIndex
method, but I can't find anything similar for the ABPeoplePickerView
There is a notification ABPeoplePickerNameSelectionDidChangeNotification
that is posted when the selected record changes, but I can't find a way of plugging in a property of the record into the view so I can make it visible.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
使用
selectRecord:byExtendingSelection:
时,它会自动滚动到您的选择,例如:确保为 byExtendingSelection 参数传递 NO。
PS:上一张海报是在 iPhone 上的;)
It will automatically scroll to your selection when using
selectRecord:byExtendingSelection:
for example:Be sure you're passing NO for the byExtendingSelection argument.
PS: Previous poster is in iPhone land ;)
那么scrollPersonToView 方法怎么样?
How about the scrollPersonToView method?