MICountryPicker icon indicating copy to clipboard operation
MICountryPicker copied to clipboard

Wrong title for header in section

Open iDevelopper opened this issue 8 years ago • 0 comments

When we enter some text in search bar:

2016-10-29_08-35-19

I propose:

    override open func tableView(_ tableView: UITableView, titleForHeaderInSection section: Int) -> String? {
        if (searchController.searchBar.text?.characters.count)! > 0 {
            return searchController.searchBar.text // Or only the first character ??
        }
        if !sections[section].countries.isEmpty {
            return self.collation.sectionTitles[section] as String
        }
        return ""
    }

iDevelopper avatar Oct 29 '16 06:10 iDevelopper