> On Apr 14, 2015, at 6:57 AM, Gerriet M. Denkmann <[email protected]> wrote: > > >> On 14 Apr 2015, at 03:52, Chris Ridd <[email protected]> wrote: >> >> >>> On 13 Apr 2015, at 12:18, Gerriet M. Denkmann <[email protected]> wrote: >>> >>> Using Xcode Version 6.3 (6D570) I added a Search Bar and Search Display >>> Controller into a project with Deployment Target = 8.3. >>> Which turns out to be of class UISearchDisplayController. >>> >>> But it seems that UISearchDisplayController is deprecated starting in 8.0, >>> replaced by UISearchController >>> >>> So: How to add a Search Bar with a UISearchController? >> >> The things you see in Interface Builder are a red herring, ignore them IMO. >> >> You need to create the UISearchController in code (e.g. in viewDidLoad). It >> creates the UISearchBar object, which you then typically set as the table >> header view. > > There is a sample project TableSearchwithUISearchController which does this > (created in code, not in Xcode). > > Gerriet.
I found this useful as it seemed simpler than Appleās version that used a separate ViewController class for showing search results. http://useyourloaf.com/blog/2015/02/16/updating-to-the-ios-8-search-controller.html Dave _______________________________________________ Do not post admin requests to the list. They will be ignored. Xcode-users mailing list ([email protected]) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/xcode-users/archive%40mail-archive.com This email sent to [email protected]
