Created
July 26, 2020 05:16
-
-
Save olivaresf/4aef48b9c25fba224661c27a23230ab8 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 numberOfSections(in tableView: UITableView) -> Int { | |
guard yourContacts.count > 0 else { return 0 } | |
return UILocalizedIndexedCollation.current().sectionTitles.count | |
} | |
override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { | |
let contactsInSection = yourContacts.object(at: section) as! NSArray | |
return contactsInSection.count | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment