(hmm.. long title)
If I start out with an NSArray of custom objects (each object is a Person) like this:
{
surname:Allen forename: Woody,
surname:Baxter forename: Stanley,
surname:Clay forename: Cassius
}
..etc..
You can see that the array is already in surname order. How do I use that array to create a a UITableView with a section headers A, B C etc, as well as an index thing on the side running vertically
A
B
C
EDIT
I guess what I'm asking is how to turn my array of objects into a Section Array, with all the first letters of the Surnames, and a Surname Array which is perhaps a nested array like this:
{
letter: a
{ surname:Allen forename: Woody }
letter: b
{ surname:Baxter forename: Stanley }
etc
}
In fact, perhaps just a nested array will do.