Reputation: 2493
I need to use ABPeoplePickerView to implement my AddressBook application. the view in IB is like this:
and it's like the following after running:
I want to delete the search field and add a button(like "add") on the top, but I don't know how to change the view layout. Is there any way to do it?
Upvotes: 0
Views: 101
Reputation: 616
This function finds the search field. Hopefully it may point the way for you to proceed.
extension ABPeoplePickerView {
func searchField () -> NSSearchField?{
for v in self.subviews[0].subviews {
if v.isKind(of: NSSearchField.self) { return (v as! NSSearchField) }
}
return nil
}
}
Upvotes: 0