Developers, I have added uitextviews as a subviews in uitableviewcell. I have about 4 columns and 30 rows in custom cell. Now the problem is that i have to alloc everytime new uitextview , thats why scrolling of tableview have become very slow, cells take so much time to load. Can anyone tell me how can i alloc my textview only once and reuse that for other cells also.
0
votes
I am using table cell instance. But i also want to reuse the textview which is the subview in the cell. Since there are dynamic number of columns ,sometimes 2 or 3 maybe 4, an i am filling the table row wise. First 3 starting elements in first row.then other 3 uiviews in second row. I used custom cell but while filling the third uivew in the row the first two are overlapped by the third one. Please tell me how can reuse the cell as well as the subview which is uiview..
– Prerna
1 Answers
1
votes
If you create a custom subclass of UITableViewCell, it is possible to queue/dequeue cell that have a UITextField. You should be able to reset your textview using the following method:
- (void)prepareForReuse;
It is normal for a program to have multiple different subclass of a UITableViewCell. This is one of the most subclassed object in UIKit