How to animate the width and height of a UIView in Xcode?

前端 未结 7 671
温柔的废话
温柔的废话 2021-01-30 23:27

I have this subview I want to add to my main view, but make it expand from the origin. I read some of the Apple documentation but I don\'t understand where I am making mistake.

7条回答
  •  有刺的猬
    2021-01-30 23:49

    If your viewcontrollers viewWillLayoutSubviews (or such) sets the "initial" frame of yourView, then that apparently gets called during the animation cycle, and would therefore reset the frame set by the animation.

提交回复
热议问题