I'm using Xcode 8 and Swift 3. I would like to create a dynamic UITableView to hold customer names with an alphabetical index letters or tabs on the right side for quick navigation.
I have found info on how to create the dynamic UITableView, so I'm good there, but haven't found any info on how to the alphabetical indexing.
Could someone please provide some information on how to do the indexing on a UITableView?
There is a delegate method for UITableview to do this job.
override func sectionIndexTitlesForTableView(tableView: UITableView) -> [AnyObject]! { return indexTitlesArray }
This is the method that shows indexTitlesForTableView. return indexTitles from this method.
Here is the link for more info: Section index titles for tableView
You need to implement the delegate method sectionIndexTitlesForTableView. This method is used to add quick jump navigation feature with UITableView.
You can refer this article.
https://www.appcoda.com/ios-programming-index-list-uitableview/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With