4

I am displaying list of persons in a tableView. On clicking any of the cell, app displays a new screen. When user comes back to previous screen, a tableView should appear. Here, when user comes back to screen with tableView, I call server API to get updated list of people and reload table to display them.

The issue is when user comes back to screen and tableView is displayed, label in UITableViewCell is animated a little bit. This animation is such that label moves from some place below its correct position and animation upwards to its correct position. This animation is not implemented by me, neither do I want it. Its visible for around 0.5-1 sec.

Compare below label's position before and after animation.

enter image description hereenter image description here

Has anyone experienced this?

Note : Note that I have used autolayout. Which might be an issue because before using autolayout this issue was not there.

Edit : Tried to disable implicit animation as shown below but not working.

NSMutableDictionary *newActions = [[NSMutableDictionary alloc] initWithObjectsAndKeys:[NSNull null], @"onOrderIn",
                                   [NSNull null], @"onOrderOut",
                                   [NSNull null], @"sublayers",
                                   [NSNull null], @"contents",
                                   [NSNull null], @"bounds",
                                   nil];
cell.textLabel.layer.actions = newActions;
cell.detailTextLabel.layer.actions = newActions;
cell.layer.actions = newActions;
cell.contentView.layer.actions = newActions;
Geek
  • 8,280
  • 17
  • 73
  • 137

1 Answers1

1

Solved the issue. Sorry to bother you guys. It was so silly. I was refreshing the table when user comes back from next view controller by calling REST API and then calling a method displayTable which displays a table from bottom. Now, I call reloadData method to refresh it if its already displayed, instead of calling displayTable.

Geek
  • 8,280
  • 17
  • 73
  • 137