Created
July 26, 2020 05:09
-
-
Save olivaresf/73c9702d1e48fee70fd6cde7b1cf3111 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
override func numberOfSectionsInTableView(tableView: UITableView) -> Int { | |
// #warning Potentially incomplete method implementation. | |
// Return the number of sections. | |
var numberOfSections = UILocalizedIndexedCollation.currentCollation().sectionTitles.count | |
//println("numberOfSections: \(numberOfSections)") | |
return numberOfSections | |
} | |
override func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int { | |
// #warning Incomplete method implementation. | |
// Return the number of rows in the section. | |
return (yourContacts.count > 0) ? yourContacts.objectAtIndex(section).count : 0 | |
} | |
/*override func tableView(tableView: UITableView, titleForHeaderInSection section: Int) -> String? { | |
var showSection:Bool = yourContacts?.objectAtIndex(section).count != 0 | |
//only show the section title if there are rows in the section | |
return (showSection) ? (UILocalizedIndexedCollation.currentCollation().sectionTitles[section] as String) : nil; | |
}*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment