 import RealmSwift
 import Ruler
 
-//class SearchController: UISearchController {
-//
-//    override func preferredStatusBarStyle() -> UIStatusBarStyle {
-//        return .Default
-//    }
-//}
-
 class ContactsViewController: BaseViewController {
 
     @IBOutlet weak var contactsTableView: UITableView!

            searchController.searchBar.backgroundColor = UIColor.whiteColor()
            searchController.searchBar.barTintColor = UIColor.whiteColor()
            searchController.searchBar.searchBarStyle = .Minimal
            //searchController.searchBar.translucent = false
            searchController.searchBar.sizeToFit()

            searchController.searchBar.delegate = self


        // 超过一定人数才显示搜索框

        if friends.count > Int(Ruler.match(.iPhoneHeights(6, 8, 10, 12))) {

            let searchController = UISearchController(searchResultsController: nil)
            searchController.delegate = self
