search

Home  >  Q&A  >  body text

ios - 使用了自定义的转场动画后,toviewcontroller的tableview的位置发生了偏移,怎么破?

PHP中文网PHP中文网2770 days ago459

reply all(5)I'll reply

  • PHP中文网

    PHP中文网2017-04-17 17:20:48

    self.automaticallyAdjustsScrollViewInsets = YES;

    Try changing the properties of this UIViewController. If it doesn’t work, just change contentInset

    reply
    0
  • PHPz

    PHPz2017-04-17 17:20:48

    Just add a top margin to the content of your tableView,

    tableView.contentInset = UIEdgeInsetsMake(64, 0, 0, 0);

    reply
    0
  • 怪我咯

    怪我咯2017-04-17 17:20:48

    I encountered the same problem as the original poster. It was normal on iOS8, but this problem appeared on iOS9. The weirdest thing is that it returned to normal when it was hung to the background and then opened again. I even wondered if it was a bug of iOS9.
    Has the original poster solved it? .

    reply
    0
  • 大家讲道理

    大家讲道理2017-04-17 17:20:48

    When printing the frame of toViewController, is the size 600*600? It seemed to be like this last time. Just reset its frame to the size of the current screen.

    reply
    0
  • 伊谢尔伦

    伊谢尔伦2017-04-17 17:20:48

    Has the poster solved this problem? It seems that custom transition animation will invalidate self.edgesForExtendedLayout = UIRectEdgeNone, but using the system will not. All my projects use UIRectEdgeNone, and I can't find a solution if I want to add transition animation.

    reply
    0
  • Cancelreply