Note that there are some explanatory texts on larger screens.

plurals
  1. POWhy my UITableView not smooth when scroll first time?
    primarykey
    data
    text
    <p>My table view cell has four labels. The table view is not smooth when scroll in first time. After all cells displayed one time, the scrolling is so smooth with no problem. So I thought the problem is the speed of loading one cell in the first time.</p> <p>I have reuse cell but the problem is not solved. Please help me! Thanks so much!</p> <p>Here is my code:</p> <pre><code>// Customize the appearance of table view cells. - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *MyIdentifier = @"MyIdentifier"; UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:MyIdentifier]; if (cell == nil) { NSArray *views = [[NSBundle mainBundle] loadNibNamed:@"ForumListTableViewCell" owner:self options:nil]; cell = [views objectAtIndex:0]; } NSDictionary *cate = [_forums objectAtIndex:indexPath.section]; NSArray *forumsInCate = [cate objectForKey:@"forums"]; NSDictionary *forumInfo = [forumsInCate objectAtIndex:indexPath.row]; // title1 UILabel *forumTitleLabel = (UILabel *)[cell viewWithTag:1]; forumTitleLabel.text = [forumInfo objectForKey:@"name"]; // master UILabel *masterLabel = (UILabel *)[cell viewWithTag:2]; NSString *master = [forumInfo objectForKey:@"moderators"]; masterLabel.text = master; // title2 UILabel *threadTitleLabel = (UILabel *)[cell viewWithTag:3]; NSString *lastPostTitle; NSDictionary *lastPostInfo = [forumInfo objectForKey:@"lastpost"]; lastPostTitle = [lastPostInfo objectForKey:@"subject"]; threadTitleLabel.text = lastPostTitle; // author UILabel *authorLabel = (UILabel *)[cell viewWithTag:4]; authorLabel.text = [NSString stringWithFormat:@"%@ / %@", [forumInfo objectForKey:@"threads"], [forumInfo objectForKey:@"posts"] ]; return cell; } </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload