本文介紹了獲取 iPhone 上當前的 UIScrollView 滾動值?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!
問題描述
如果我有一個 UIScrollView
并將其移動到特定位置,有沒有辦法讓它也移動到那個位置?
If I have a UIScrollView
and move it around to a specific location, is there any way to get that position it has moved too?
推薦答案
查看UIScrollView的contentOffset屬性:
Check UIScrollView's contentOffset property:
contentOffset - 內容視圖的原點從滾動的原點偏移查看.
contentOffset - The point at which the origin of the content view is offset from the origin of the scroll view.
通過實現和設置 UIScrollView 的委托,您還可以處理 UIScrollView 中的大量滾動/縮放事件.
By implementing and setting UIScrollView's delegate you can also handle numerous scrolling/zooming events in UIScrollView.
這篇關于獲取 iPhone 上當前的 UIScrollView 滾動值?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!
【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!