久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

獲取 UIScrollView 滾動到頂部

Get UIScrollView to scroll to the top(獲取 UIScrollView 滾動到頂部)
本文介紹了獲取 UIScrollView 滾動到頂部的處理方法,對大家解決問題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

問題描述

如何讓 UIScrollView 滾動到頂部?

How do I make a UIScrollView scroll to the top?

推薦答案

iOS 7 更新

[self.scrollView setContentOffset:
    CGPointMake(0, -self.scrollView.contentInset.top) animated:YES];

原創(chuàng)

[self.scrollView setContentOffset:CGPointZero animated:YES];

或者如果你想保留水平滾動位置并重置垂直位置:

or if you want to preserve the horizontal scroll position and just reset the vertical position:

[self.scrollView setContentOffset:CGPointMake(self.scrollView.contentOffset.x, 0)
    animated:YES];

這篇關(guān)于獲取 UIScrollView 滾動到頂部的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

【網(wǎng)站聲明】本站部分內(nèi)容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請聯(lián)系我們刪除處理,感謝您的支持!

相關(guān)文檔推薦

iOS - Using storyboard and autolayout to center the UIScrollView(iOS - 使用故事板和自動布局使 UIScrollView 居中)
get index or tag value from imageview tap gesture(從 imageview 點(diǎn)擊手勢獲取索引或標(biāo)簽值)
UIScrollView not scrolling regardless of large contentSize(無論內(nèi)容大小如何,UIScrollView 都不會滾動)
Clean autorotation transitions in a paging UIScrollView(清除分頁 UIScrollView 中的自動旋轉(zhuǎn)轉(zhuǎn)換)
UIScrollView zooming with Auto Layout(UIScrollView 使用自動布局縮放)
How to create an image from a UIView / UIScrollView(如何從 UIView/UIScrollView 創(chuàng)建圖像)
主站蜘蛛池模板: 夜夜精品浪潮av一区二区三区 | 国产精品久久久久久久免费观看 | 91免费在线看 | 亚洲九九精品 | 国产麻豆乱码精品一区二区三区 | 天天澡天天狠天天天做 | 久久久久久国产 | av网站免费在线观看 | 精品在线一区二区 | 在线视频中文字幕 | 成人在线观看亚洲 | 精品久久久网站 | 免费成人高清 | 武道仙尊动漫在线观看 | 国产96色在线 | 99国产精品久久久 | 国产成人精品a视频一区www | www.久久久久久久久久久久 | 色约约视频 | 黄色一级毛片 | 国产一区二区精品在线 | 亚洲视频在线观看免费 | 久久精品视频网站 | 色资源在线 | 午夜免费视频 | 国产精品美女久久久久久久网站 | 成人免费在线小视频 | 91视频大全 | 伊人激情网 | 久久伊人影院 | 色999日韩| 999久久久免费精品国产 | 99re在线视频精品 | 992人人草 | 国内自拍视频在线观看 | 精品视频一区二区三区在线观看 | 97超碰成人 | 亚洲一区二区三区免费观看 | 国产情侣在线看 | 91精品国产99| 丁香久久|