[問題] StackView Autolayout

作者: Zongsheng (Zongsheng)   2017-10-04 19:36:43
不好意思 新手很笨的問題
但實在困擾好幾天了
單獨label設定autolayout沒問題
但是合併成stackview 設定autolayout 為何就跑掉了?
https://imgur.com/a/ez83T
https://imgur.com/a/WaIEk
像這個樣子,感謝有鄉民能指點一下迷津 !
作者: gundam00 (傻那駕駛中)   2017-10-04 20:52:00
因為你label的superview從原本的content view變成stackview 所以你的定錨點不一樣了 原本的constraints也該無效(我猜的
作者: G888888   2017-10-05 09:55:00
我猜是右手邊distribution設定的關係如果你要設定裡面的寬高,alignment: center, dis:fill裡面的屬性都拿來試大概就知道怎麼用了,如果有說錯請指點我

Links booklink

Contact Us: admin [ a t ] ucptt.com