在Design界面直接拖放控件的時候,提示AS- This view is not constrained vertically. At runtime it will jump to the left/(0,0) unless you


 

AS- This view is not constrained vertically. At runtime it will jump to the left/(0,0) unless you add constraint.

 

吶,design 拖拽按鈕呀文字框過去的時候,text狀態會出現的紅色警告,說沒有添加約束,運行時會跳到(0,0)左上角位置喔

 

然后呢,design狀態下拖過去之后呢,在這小道具右鍵,Constraint(約束)  Layout->Infer Constraints,點一下,就ok啦~


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM