Search code examples
iosswiftuisearchcontroller

How to show a search bar and when click put it in navigation item?


I'm not too good on naming questions, so, any edit to help for it will be nice.

Anyway, I'm trying to achieve the same as the Message (SMS) iPhone app. When you open the app, it shows a search bar inside the table. And when you click on it, the search goes to the navigation bar. I was doing all the job by myself (creating a view with table view and search inside, when click on search input I goes to the search controller). I guess there is something smart, doesn't?

Here goes the images of the app

enter image description here

enter image description here


Solution

  • Reading the comment's I realize what I was doing wrong. The mains problem is my search was in the NavigationItem instead TableView's Header. After changing it, worked nicelly.

    Thanks guys