1.先放置一個UIScrollView,並設定好AutoLayout(上下左右)

2.再放置UILabel到UIScrollView裡面

3.設定UILabel的上下左右AutoLayout


這時ScrollView就會以Label 的大小為Scroll範圍 


參考資料:

Correctly Size UILabel inside UIScrollView using Interface Builder and Autolayout?

http://www.appcoda.com.tw/uiscrollview-introductio...

arrow
arrow
    全站熱搜

    小賢 發表在 痞客邦 留言(0) 人氣()