本文介紹了UIScrollview 自動布局問題的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!
問題描述
我的自動布局(可能)和我的滾動視圖有問題!
I have a problem with autolayout(maybe) and my scrollview!
我的問題
- 我向下滾動
2.然后我推送到另一個視圖
2.Then I push to another View
3.然后我回去,滾動視圖看起來像那樣,我無法滾動到最高點.(我在滾動視圖的彈跳中看到它)
3.Then I go back and the scrollview looks like that and I'm not able to scroll to the highest point.(I see it in the bouncing of the scrollview)
誰能幫幫我?
推薦答案
包含視圖控制器中的以下代碼片段似乎也解決了這個問題,而不依賴于顯式大小:
The following code snippet in the containing view controller also seems to solve the problem, without relying on explicit sizes:
- (void)viewDidDisappear:(BOOL)animated {
[super viewDidDisappear:animated];
self.mainScrollView.contentOffset = CGPointZero;
}
它確實將內容偏移量重置為原點,但其他答案似乎也是如此.
It does reset the content offset to the origin, but it seems that so do the other answers.
這篇關于UIScrollview 自動布局問題的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!
【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!