Is there a UIView resize event?

前端 未结 7 2136
难免孤独
难免孤独 2020-11-28 03:29

I have a view that has rows and columns of imageviews in it.

If this view is resized, I need to rearrange the imageviews positions.

This view is a subview of

7条回答
  •  执笔经年
    2020-11-28 03:51

    If you're in a UIViewController instance, overriding viewDidLayoutSubviews does the trick.

    override func viewDidLayoutSubviews() {
        // update subviews
    }
    

提交回复
热议问题