Search feature on NavigationBar
Search feature on NavigationBar
- Subject: Search feature on NavigationBar
- From: Sasikumar JP <email@hidden>
- Date: Thu, 23 Oct 2014 09:53:30 +0530
Hi,
I am working on iOS 8 based application, i want to use
UISearchController to provide search feature. I am able to show the
searchBar by setting tableViewHeaderView as
serachController.searchBar. but this approach shows searchBar permanently
on tableView.
Instead of that i want to display the search bar only when user needs.
I am looking for a solution to show the searchController when tap the
search bar button on navigation bar.
@IBAction func searchButtonTapped(sender: UIBarButtonItem) {
// I don't know what code should go here to display search bar, i tried
couple of them like below, but nothing display searchBar
//1. searchController.searchBar.becomeFirstResponder()
//2. showViewController(searchController, sender: nil)
//3. searchController.active = true
}
what code should go in searchButton action method to display searchBar.
Regards
Sasikumar
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden