Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

SOLVED: sectionForSectionIndexTitle and sectionIndexTitlesForTableView Not called in swift 3

Divya Patel:

I have used contact Book in project and all data display as sectionWise.Tableview section index not display for that implement Sectionforsectionindextitle and sectionIndexTitlesForTableView but not call.

For that i have used following code :


let arrIndexSection = ["A","B","C","D", "E", "F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"]
func tableView(_ tableView: UITableView, sectionForSectionIndexTitle title: String, at index: Int) -> Int
{

return ([UITableViewIndexSearch] + UILocalizedIndexedCollation.current().sectionIndexTitles as NSArray).index(of: title) - 1
}
func sectionIndexTitlesForTableView(tableView: UITableView) -> [AnyObject]!
{
return arrIndexSection as [AnyObject]
}

Any one have idea or solution for above solution then please help me.

Thanks.



Posted in S.E.F
via StackOverflow & StackExchange Atomic Web Robots
This Question have been answered
HERE


This post first appeared on Stack Solved, please read the originial post: here

Share the post

SOLVED: sectionForSectionIndexTitle and sectionIndexTitlesForTableView Not called in swift 3

×

Subscribe to Stack Solved

Get updates delivered right to your inbox!

Thank you for your subscription

×