When is layoutSubviews called?

后端 未结 9 1751
忘掉有多难
忘掉有多难 2020-11-22 14:58

I have a custom view that\'s not getting layoutSubview messages during animation.

I have a view that fills the screen. It has a custom subview at the bo

9条回答
  •  耶瑟儿~
    2020-11-22 15:14

    I tracked the solution down to Interface Builder's insistence that springs cannot be changed on a view that has the simulated screen elements turned on (status bar, etc.). Since the springs were off for the main view, that view could not change size and hence was scrolled down in its entirety when the in-call bar appeared.

    Turning the simulated features off, then resizing the view and setting the springs correctly caused the animation to occur and my method to be called.

    An extra problem in debugging this is that the simulator quits the app when the in-call status is toggled via the menu. Quit app = no debugger.

提交回复
热议问题