UITableViewRowAnimation with visible imperfections

I have created a UITableView programmatically with 3 cells in the section at index 0. Now when I flip the UISwitch in the cell at index 0 in that section it animates the insertion of a third cell.

Unfortunately I get those weird lines at the end of a UITableViewRowAnimation as you can see in the picture below. The same happens when the deletion of the cell is animated.


Can someone tell me how to fix this? It looks really ugly. Here the code that gets executed when the UISwitch is on:

NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];

NSArray *rowAtIndex2inSectionAtIndex0 =
        [NSArray arrayWithObject:
        [NSIndexPath indexPathForRow:2 inSection:0]];

if ([defaults boolForKey:@"one"] == 1 &&
    [defaults boolForKey:@"two"] == 1 &&
    numberOfRowsInSection0 == 2)

Hello, buddy!责编内容来自:Hello, buddy! (源链) | 更多关于

本站遵循[CC BY-NC-SA 4.0]。如您有版权、意见投诉等问题,请通过eMail联系我们处理。
酷辣虫 » 移动开发 » UITableViewRowAnimation with visible imperfections

喜欢 (0)or分享给?

专业 x 专注 x 聚合 x 分享 CC BY-NC-SA 4.0

使用声明 | 英豪名录