IOS stackview addArrangedSubview add at specific index

前端 未结 2 672
长情又很酷
长情又很酷 2021-02-06 21:42

How is it possible to add a arranged subview in a particular index in a UIStackView?

something like:

stackView.addArrangedSubview(nibView, atIndex: inde         


        
2条回答
  •  灰色年华
    2021-02-06 22:20

    You mean you want to insert, not add:

    func insertArrangedSubview(_ view: UIView, atIndex stackIndex: Int)
    

提交回复
热议问题