开发者

How can i scroll in a UIScrollView to a certain point?

开发者 https://www.devze.com 2023-03-22 04:41 出处:网络
How can i scroll to a point (x,y) in a scr开发者_StackOverflow中文版oll view in an animated way (i.e. get to (x,y) in 1 second ) ? You use the scrollRectToVisible:animated: method, passing it a rectan

How can i scroll to a point (x,y) in a scr开发者_StackOverflow中文版oll view in an animated way (i.e. get to (x,y) in 1 second ) ?


You use the scrollRectToVisible:animated: method, passing it a rectangle that you want to be visible after the scrolling has been completed.

You can read up more on this in the official documentation.


Did you read Apple Docs ? Check http://developer.apple.com/library/ios/#DOCUMENTATION/UIKit/Reference/UIScrollView_Class/Reference/UIScrollView.html .

0

精彩评论

暂无评论...
验证码 换一张
取 消