Re: UISearchController
Re: UISearchController
- Subject: Re: UISearchController
- From: email@hidden
- Date: Wed, 15 Apr 2015 19:58:44 -0400
> On Apr 14, 2015, at 6:57 AM, Gerriet M. Denkmann <email@hidden> wrote:
>
>
>> On 14 Apr 2015, at 03:52, Chris Ridd <email@hidden> wrote:
>>
>>
>>> On 13 Apr 2015, at 12:18, Gerriet M. Denkmann <email@hidden> 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@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden