Overlapping Views in UIStackView

后端 未结 7 1695
时光说笑
时光说笑 2020-12-14 17:24

I have an horizontal stack view that I added arranged sub views to it (7 cells). Each one of the cells in the stack has a circular badge that exceeds the view boundaries (ne

7条回答
  •  渐次进展
    2020-12-14 17:28

    Since iOS 9.0 it's possible to set the z-order and arrangement of stack view subviews independently. Use the new arrangedSubviews property to specify the subviews arrangement along the stack view’s axis. And use subviews property to specify subviews z-order based on their index in the array.

    The stack view ensures that its arrangedSubviews property is always a subset of its subviews property.

    Documentation for arrangedSubviews

提交回复
热议问题