Relativelayout or LinearLayout in ios iphone development?

前端 未结 6 735
再見小時候
再見小時候 2021-02-08 15:23

I want to add a subview in the top of my view, I have to recalculate the origin y value for all of other views and re-position them to leave space for the new added view.

<
6条回答
  •  天命终不由人
    2021-02-08 15:37

    You've got no luck here. iOS doesn't have provisions for positioning the views in different layouts like Android. You need to reposition all the other subviews to make the way for the new view.

    There are some view resizing methods like sizeToFit and autoResizingMask but they won't help you in your case here.

提交回复
热议问题