/ios-uisearchcontroller-objc

Search and Filter a Sectioned UITableView using the new UISearchController introduced with iOS 8.

Primary LanguageObjective-CApache License 2.0Apache-2.0

ios-uisearchcontroller

Description

With iOS 8, UISearchDisplayController is now deprecated. This repo provides sample code for one way to approach searching/filtering a sectioned UITableView using the new UISearchController introduced with iOS 8.

Resembling the user interface of the Contacts app, the provided sample code implements the following features:

  • Displaying data in a UITableView with Sections.
  • Data is persisted as NSManagedObject subclasses using Core Data.
  • A Section Index allows the user to quickly move through the table items with a swipe gesture.
  • Finally, the iOS 8 UISearchController is used to present a Search Bar that allows the user to search and filter the items presented in the UITableView.

Wait, wuh? Here are some screen shots ... screenshot

Language

Objective-C

User Interface Idiom

This version of the solution uses Storyboards to layout the view hierarchy.

Unit Testing Framework

Unit tests are provided to demonstrate ways to assert behavior and state of Model classes and Controller classes in this sample. Uses the XCTest.framework.

Contact