本文介紹了UIScrollView 在從不同的視圖控制器 segu 時(shí)具有不同的 y 位置的處理方法,對(duì)大家解決問題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!
問題描述
不知道如何解釋這一點(diǎn),只是當(dāng)從一個(gè)控制器進(jìn)行 segue 時(shí),滾動(dòng)視圖在屏幕上低于另一個(gè)正確的 segue.
Not sure how to explain this, simply when seguing from one controller the scroll view is lower on the screen than from another segue where it is correct.
推薦答案
設(shè)置這2個(gè)scrollview屬性并勾選.
Set this 2 scrollview property and check it.
self.scrollView.contentOffset = CGPointZero;
self.scrollView.contentInset = UIEdgeInsetsZero;
檢查這個(gè)答案它可能會(huì)幫助你UIScrollView 在 contentSize 變化時(shí)調(diào)整 contentOffset
Check this answer it may help you UIScrollView adjusts contentOffset when contentSize changes
這篇關(guān)于UIScrollView 在從不同的視圖控制器 segu 時(shí)具有不同的 y 位置的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!
【網(wǎng)站聲明】本站部分內(nèi)容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請(qǐng)聯(lián)系我們刪除處理,感謝您的支持!