How can I add a UISearchDisplayController to a UIView? Interface builder won't let me.
A:
Just do it in code e.g. (assuming the view controller is vc):
[vc addSubview:mySearchDisplayController.searchBar];
// Note that searchBar is the view, and mySearchDisplayController only CONTROLS the searchBar etc.
jrtc27
2010-09-14 17:56:10
A:
A UISearchDisplayController cannot be added to a UIView because it doesn't inherit from a UIView. You can add a UISearchBar in Interface builder with an IBOutlet and then create a UISearchDisplayController with that UISearchBar programmatically.
Felixs
2010-09-14 18:39:45