I have now a UITableView with multiple sections in it. Only if I add a list with the start letters of the sections title (ABCDE etc) as SectionIndexTitles and the list is not yet filtered for double values.
So the list would be:
Everything works fine but what I want is the following:
And if you go to the letter E, you start with Elvis Presley.
Getting all the first letters available is not a problem, but if I run the application and click on the E, the list goes to D12 instead of Elivs Presley.
So the problem is something to do with the index of the SectionIndexTitles and the sections self but I can't find a solution...
Try to distinct your array before it will be used in SectionIndexTitles
:
sectionTitles = sectionTitles.Distinct().ToList();
Thus, you will remove doubled A and other letters in section titles.
Note that you should to check SectionFor
method code to correctly scroll UITableView
to your sections.