开发者

iphone draw over UIScrollView with MultiTouch

I'm creating methods to use multi-touch taps to draw shapes on top of an image inside a UIScrollView. I'm thinking that I should just create a new UIView subclass for the shapes and add them as a subView to the main controller that c开发者_如何学编程ontains the scrollView.

If so, can I simply use touchesBegan, touchesMoved, ... with the new UIView subclass? And if not how do I connect the touches to the drawing logic.

Thanks!


To get the touch method in UIScrollView you need to make your own class for Scrollview which is sub class of the UIscollview and use that class in place of the UIScrollView. As you class is Sub class of UIScrollView you can get all the method of the UIScrollView through object of you class.

Now for getting touch method you will get in you class and using custom delegate you can call in any class.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜