last day (14 days later) » 

11:08
0
Q: Some (Custom) Cells do not render in UITableView

PacemakerI have a UITableView with custom cells. Most of the cells get drawn correctly. But some cells render for a short period (milliseconds) then the content inside the cell disappear. For my cellForRowAtIndexPath, I have created a unique identifier for each cell for reuse. This is the identifier I us...

dont use identifier different for each row.Identifier is used for reuse, then if you have different identifiers for each cell then there is no use of using identifiers
why not? I have a short list. and it does a good job for keeping order when scrolling.
Send the code for cell for row at index
just for knowledge, take 1000 cell and use different identifiers for each and see the memory.Then you will find the difference
I am sure it will make a big difference for large lists. My list will be way smaller than 1000.
Just for time, change the line NSString *CellIdentifier = [NSString stringWithFormat:@"identifier1"];
11:08
I just did. It gave me the same behavior. I am thinking it is an issue of rendering (IB) in setting up the nib file for the cell
Is issue resolved
Hi ramesh
Thanks for your interest and time
It was not resolved. Same behaviour
Szu
Szu
Hey Pacemaker. Your code looks okey. Please add to your question CustomTableViewCell
Okay will do now
Szu
Szu
Using unique CellIdentifier may cause performance problems, but not cell (or text) appear-disappear.
11:13
exactly what I was thinking
Do you think it is a nib issue ?
It is weird. I scroll down and up. Sometimes it appears, other times not. I can't see a pattern
Szu
Szu
I think the problem lays in CustomTableViewCell. Can you use default UITableViewCell for testing purposes?
Just copy the code from :
https://developer.apple.com/library/ios/documentation/userexperience/conceptual/tableview_iphone/TableViewCells/TableViewCells.html
Listing 5.1. For me important is cell initialization:

if (cell == nil) {
cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:Unique identifier];
cell.selectionStyle = UITableViewCellSelectionStyleNone;
}
I am afraid I can't try a regular cell since I have many elements that are included in the view. I will try to add the selection style line
Szu
Szu
11:31
So? Where is CustomTableViewCell?
12:19
Now just the first element doesn't load

last day (14 days later) »