以我的例子來說,如果全部都用Storyboard的UI來建,並且設定AutoLayout,其實可不必設scrollView.contentSize,他會以AutoLayout的Constraints 來決定ScrollView的可滑動區域(contentSize),如果不能滑動,代表有些Constraints沒有設定到(必須要上下左右都有對到scrollView)


參考資料:

(Carlos Compean 的解法) http://stackoverflow.com/questions/28144739/swift-...

arrow
arrow
    全站熱搜

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