hi,
A very very strange things going on in my app. First i used the touchCells example from Apple and imported its customCell class into my project. Now Everything worked great!, I then changed the whole datasource to SQL and retrieved about 400 cells worth of data into tableView display.
Everything still working great. cells are getting "checked" when touched.
heres the thing,
While scrolling through the tableview and selecting (checking) cells, I noticed that cells that i selected were unchecked. and some other ones checked.
I tried rewriting the code and still making things clearer.
The selection had some kind of a pattern. if Cell 0 is checked, then automatically cell 11 , cell 22, cell 33 got checked too.
If I scroll down alot faster, this pattern breaks. And some other cells get checked.
I couldnt really find anything wrong with the code. I thought maybe the indexpath.row got screwd up, but its fine. All values assigned are unique.
Anyone with Any explanation for this strange behaviour? Tested on simulator.
An other question I had was,
How do i retrieve the Indexpath.row of an cell in code. This is obviously easy on touch. But i required to know how to do it programmatically.
In other words, I have an NSObject, I know that, that Object is displayed somewhere in the tableView. I need to get its location (whats the cell row?) so that I may delete it.
MutableArray is what stores this data. So I assumed that Index of Object in MutabArray what be the same as the tableView cell row. ( i dont know if i'm correct on this assumption).
So my code deletion of an a cell goes like.. : get the object, retrieve the cell row of that object in tableview. Cell.row == indexofObj Array. Delete that index from Array, reload tableView.
Any help would be very very appreciated.
A very very strange things going on in my app. First i used the touchCells example from Apple and imported its customCell class into my project. Now Everything worked great!, I then changed the whole datasource to SQL and retrieved about 400 cells worth of data into tableView display.
Everything still working great. cells are getting "checked" when touched.
heres the thing,
While scrolling through the tableview and selecting (checking) cells, I noticed that cells that i selected were unchecked. and some other ones checked.
I tried rewriting the code and still making things clearer.
The selection had some kind of a pattern. if Cell 0 is checked, then automatically cell 11 , cell 22, cell 33 got checked too.
If I scroll down alot faster, this pattern breaks. And some other cells get checked.
I couldnt really find anything wrong with the code. I thought maybe the indexpath.row got screwd up, but its fine. All values assigned are unique.
Anyone with Any explanation for this strange behaviour? Tested on simulator.
An other question I had was,
How do i retrieve the Indexpath.row of an cell in code. This is obviously easy on touch. But i required to know how to do it programmatically.
In other words, I have an NSObject, I know that, that Object is displayed somewhere in the tableView. I need to get its location (whats the cell row?) so that I may delete it.
MutableArray is what stores this data. So I assumed that Index of Object in MutabArray what be the same as the tableView cell row. ( i dont know if i'm correct on this assumption).
So my code deletion of an a cell goes like.. : get the object, retrieve the cell row of that object in tableview. Cell.row == indexofObj Array. Delete that index from Array, reload tableView.
Any help would be very very appreciated.