Problem creating checklist (similar to TouchCells sample code) app for iPhone. Random cells get chec
Posted
by Jonah
on Stack Overflow
See other posts from Stack Overflow
or by Jonah
Published on 2009-10-24T22:47:13Z
Indexed on
2010/03/23
8:53 UTC
Read the original article
Hit count: 405
I've been having a problem creating a checklist in the style of the TouchCells example from the Apple sample code. Basically, it is a table that allows multiple selection of its items and gives each selected item a check mark.
The problem I'm having is that when I select an item and then scroll down the screen, another item (off the screen) will randomly be selected. It seems that it is usually the next cell to be loaded on the screen.
I couldn't figure out what I was doing wrong so I tested it with Apple's TouchCells code. In their program though, they only have 6 cells and there is no room to scroll. So, I duplicated some of the items from the plist file to make more cells and... the same problem pops up. If you select a cell and then scroll, another cell will randomly be selected.
Update I recently tried the iPhone Dev Cookbook sample code named "Checks" and... you guessed it, the same problem. Here's the link: http://code.google.com/p/cookbooksamples/downloads/list
This is driving me nuts. Is it a bug or am I doing something wrong? Does anyone know how to fix this?
Thanks!
Also, does anyone know of any sample code that shows how to do this?
© Stack Overflow or respective owner