2016-02-29 28 views
1

我的滾動視圖看起來是這樣的:滾動型離開頂部空間

enter image description here

然後我嘗試以下行:

self.automaticallyAdjustsScrollViewInsets = false; 

它固定,但滾動不工作了。我該如何解決這個問題?

我的看法樹:

enter image description here

+0

如果我這樣做,因爲我以前說過我再也不能滾動了。 –

+0

你可以發佈你的視圖的約束,即滾動視圖 –

+0

當然。滾動視圖的約束:http://prntscr.com/a9c2qh,這是在scrollview下的視圖:http://prntscr.com/a9c2z9 –

回答

0

必須有一個問題,您的約束..

您應該給出以下約束:

滾動視圖:

pinned all edges with 0 

下滾動視圖查看:

pinned all edges with 0, height constraint and equal width to superview 

Done.You現在可以滾動視圖

0

嘗試設置頂部邊界爲0UIScrollView

<ScrollView>.contentInset = UIEdgeInsetsMake(0, 0, 0, 0); 
+0

對不起,沒有任何變化 –