1

I have label with text inside UIScrollView. When touch event occurred, i want to scroll my label with text so the text underneath the touch point will scroll to the center of the view. If i have touch event coordinates, how i can scroll UIScrollView's content from touch point to the center of the screen? Any help highly appreciated!

4

1 に答える 1

1

これを試して:

[myScroll setContentOffset: CGPointMake(x, y) animated: YES];

x,y は、タッチ イベントの座標から計算された、スクロールする必要がある myScroll の左上隅の位置です。

于 2012-04-19T18:17:27.240 に答える