Difference between addSubview and insertSubview in UIView class

后端 未结 4 656
情书的邮戳
情书的邮戳 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:47

    Using insertSubView: you can specify the index, which determines z-order of views. A view with a higher index lies above those with lower indices.

提交回复
热议问题