Skip to content

keithyipkw/ios-animation-bug

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sometimes when table view cells appear in animations, the contents inside them pop from top left (0, 0) to the final sizes. To see the problem, checkout 90d64db4f947e23175185731d9e8f2b1bb739652. Enable the slow animation in the simulator. Run the today widget. Pull down the screen to show the today center. Each pull down will toggle the the number of rows

The fix is to use dequeue and init cells with reuse identifiers. It still works when a cell appear the first time.

UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"cell"];
if (!cell) {
    cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"cell"];
    cell.textLabel.textColor = [UIColor whiteColor];
}

alt tag

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published