Difference between addSubview and insertSubview in UIView class

后端 未结 4 659
情书的邮戳
情书的邮戳 2020-12-02 11:16

What is the difference between addSubview and insertSubView methods when a view is added programmatically?

4条回答
  •  被撕碎了的回忆
    2020-12-02 11:40

    The only difference is in where the view is added: whether it is the frontmost view (addSubview:), or it is before the 5th subview, (insertSubview:atIndex:) or if it is immediately behind another subview (insertSubview:aboveSubview:).

提交回复
热议问题