开发者

Is it possible to cheat UIScrollView?

I would like to have a native scrolling experience in my iOS app from UIScrollView. But my app works on the different engine so I need to manipulate engine开发者_运维百科's objects instead of UIKit objects.

Is it possible to get the scrolling events from the UIScrollView without adding it to the view hierarchy?

I'm trying to delegate the touch events to the instance of UIScrollView and responding to the scrollViewDidScroll: but it doesn't work.

Is there any suggestion on how to initialize UIScrollView to make it think that it's in the hierarchy and make it work?


The scrollViewDidScroll: event is raised when a user scrolls when a scrollview is on the screen. If the scrollview is never on the screen, then these events can never be raised.


Trying to cheat any control is going to get you into trouble. It won't be worth it!

Im not sure what engine you are using. Can you not get this engine to add its view to a subview of UIScrollView?

Failing that you can use UIGestureRecognizer to roll your own scrolling functionality.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜