Strange animation behavior when using autorun in .xib

I have a custom tableview cell with a right-aligned button that has the following limitations:

  • Trailing space from a supervisor
  • Fixed width
  • Fixed height
  • Supervisor Upper Space

enter image description here

Now, when I launch my view controller, this edit icon icon flies and settles in the right place. How to remove this animation.

NOTE. This problem is visible only in certain cells. I also tried removing and adding the component again.

+6
source share
2 answers

Fixed the problem by updating the frame and then calling [self layoutIfNeeded]; Nothing will work if you miss the function call [self layoutIfNeeded]; after updating your frames.

+6
source

When working with autostart, you should always call [self layoutIfNeeded]; after updating the frame.

+1
source

Source: https://habr.com/ru/post/986970/


All Articles