When is the layoutSubviews method called?

后端 未结 3 1763
粉色の甜心
粉色の甜心 2020-12-25 10:22

I am going through a tutorial that mentions the following method:

-(void)layoutSubviews

located in CustomerCell.m

When is this meth

3条回答
  •  借酒劲吻你
    2020-12-25 10:52

    The layoutSubviews method will be called any time the system thinks your view needs to be layed out again. For example, if the view's frame is changed, or a subview is added, etc. If you need to manually trigger this, you can call the setNeedsLayout method.

提交回复
热议问题