Saturday 19 March 2011

(Solved) UITableViewCell not load data entirely!

I have been working around this problem since 5 months ago. When i used UITextField inside UITableView for 15 of cell inside table, it changed UITextField that I wasn't originally edited.

This problem cause by using of this method :










it will only reload as many rows visible, when you are scrolling down, it wont load inside if statement. because we use reusable cell on all rows/section.

I found out the solution to overcome this problem, it might not the best solution but I couldn't find any.

solution :



by doing this, you will only load one time per cell. you can also set your label here (if your label is static, not change further). I'm not sure what will happen if i have many Identifier. but I only have 15 rows for my project I'm working on, so it won't affect much. 

On next post, I will post  on how to create UITableView with UITextField inside with using this approach. but right now, i have to finish this project first :).

as always, drop an comment if you have better approach or feedback. Have a nice code.

No comments:

Post a Comment