Using sectioned tables from an sqlite file with an iPhone uitableview
Posted
by Chris
on Stack Overflow
See other posts from Stack Overflow
or by Chris
Published on 2010-03-22T15:52:53Z
Indexed on
2010/03/22
21:31 UTC
Read the original article
Hit count: 454
I am currently trying to make a sectioned table like this:
Section 1: Entry 1 Entry 2 Entry 3
Section 2: Entry 4 Entry 5 Entry 6
Section 3: Entry 7 Entry 8 ...
However, using this code:
Event *lists = (Event *)[eventList objectAtIndex:indexPath.row];
accessStatement = "select * from DatabaseName";
[self findEvents]; // Code that builds each object's strings from database
cell.textLabel.text = lists.name;
Section 1: Entry 1 Entry 2 Entry 3
Section 2: Entry 1 Entry 2 Entry 3
Section 3: Entry 1 Entry 2 ...
It keeps on repeating itself. How do I make the index so that it continues in each section rather than restarts?
Thanks in advance.
© Stack Overflow or respective owner