0

After playing around with segue, I have found that my UITableView lags for unknown reasons after performing a segue. Please see video: https://www.youtube.com/watch?v=mPAVcvf9UcE source code: http://pastebin.com/c62UZiNx

I have faced the problem after following the solution for this question: How can I get the UITableView scroll position so I can save it?

The only way I managed to fix this is by creating a CGPoint (like CGPointMake(0,20) ) rather than remembering it when the segue occurs.

override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) {
    if segue.identifier == "showDetailedPost" {
         if let vc = segue.destinationViewController as? DetailedPostVC {
             offset = tableView.contentOffset
             vc.num = tableView.indexPathForSelectedRow()!.row
         }
    }
}

This does not seem to fix the problem:

override func viewWillDisappear(animated: Bool) {
    offset = tableView.contentOffset
}

override func viewWillAppear(animated: Bool) {
    tableView.contentOffset = offset
}
Community
  • 1
  • 1
driver733
  • 401
  • 2
  • 6
  • 21

1 Answers1

0

The discussed behavior is fixed since iOS 8.4, so the problem is relevent only to prior iOS versions.

driver733
  • 401
  • 2
  • 6
  • 21