> 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.

I’ve used the UISearchBar in IB as a template object - I configure the object 
built by the search controller in code the same as the one created by IB, and 
then swap them. I’m not sure it is worth the effort.

Chris


 _______________________________________________
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]

Reply via email to