0

I had a tableviewcontroller with a SearchController I managed programmatically. For some reasons, I need to have a storyboard to display things a bit differently not anymore a tabéeview in full screen.

Everything is going fine with a container view inside my storyboard. The container view is linked to my custom tableviewcontroller which was managing my searchbar. When I instantiate an object, I can see my custom tableView (with a searchbar lying at the top) in the same way it was before.

I would like to remove the search bar embeded to my tableview (i.e in my tableviewcontroller) and add it directly in the storyboard (to have more at the top of my screen with free space between the search bar and the table view. I tried to insert a searchbar and displaycontroller but I am stuck in the sense I cannot link the searchBar to my tableViewController.

How can I do to link the searchbar in the UIViewController to the tableviewcontroller in the containerview? My tableviewcontroller conforms to the protocol necessary to have a searchbar working still there was no problem when they were not gathered inside a storyboard.

Here is an image if it can help.

enter image description here

If anyone could help me to link the searchbar and the tableviewcontroller...

Thanks!

Trichophyton
  • 625
  • 5
  • 21
  • Please Try - https://github.com/ccabanero/ios-uisearchcontroller-objc – Akshay Degada Nov 14 '16 at 11:56
  • I am not sure to understand. I try to have a searchbar in my uiviewcontroller and I would like to be targeting my tableview inside the container view. In your code it seems that the searchbar code lies in your tableviewcontroller. How can I manage the connection from the storyboard? – Trichophyton Nov 14 '16 at 13:00
  • Please find above github link , you will just download and refere code... – Akshay Degada Nov 15 '16 at 10:51
  • TableViewController is class and searchbar display by declare as property .... – Akshay Degada Nov 15 '16 at 10:53

0 Answers0