AVPlayer layer inside a view does not resize when UIView frame changes

前端 未结 13 788
小蘑菇
小蘑菇 2020-12-23 17:08

I have a UIView which contains an AVPlayer to show a video. When changing orientation, I need to change the size and location of the video.

<
相关标签:
13条回答
  • 2020-12-23 17:56

    First step: check out UIView's autoresizing property in UIVIew.h

    @property(nonatomic) UIViewAutoresizing autoresizingMask; // simple resize. default is UIViewAutoresizingNone

    This property correspondents to the "springs and struts" controls in IB, though it will take you some experimentation to get the results you want.

    0 讨论(0)
提交回复
热议问题