作者Zongsheng (Zongsheng)
看板MacDev
標題[問題] StackView Autolayout
時間Wed Oct 4 19:36:43 2017
不好意思 新手很笨的問題
但實在困擾好幾天了
單獨label設定autolayout沒問題
但是合併成stackview 設定autolayout 為何就跑掉了?
https://imgur.com/a/ez83T
https://imgur.com/a/WaIEk
像這個樣子,感謝有鄉民能指點一下迷津 !
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 123.192.63.102
※ 文章網址: https://webptt.com/m.aspx?n=bbs/MacDev/M.1507117005.A.F0A.html
1F:推 gundam00: 因為你label的superview從原本的content view變成stackv 10/04 20:52
2F:→ gundam00: iew 所以你的定錨點不一樣了 原本的constraints也該無 10/04 20:52
3F:→ gundam00: 效(我猜的 10/04 20:52
4F:推 G888888: 我猜是右手邊distribution設定的關係 10/05 09:55
5F:推 G888888: 如果你要設定裡面的寬高,alignment: center, dis:fill 10/05 10:10
6F:→ G888888: 裡面的屬性都拿來試大概就知道怎麼用了,如果有說錯請指 10/05 10:11
7F:→ G888888: 點我 10/05 10:12