iphone - Drawing in Custom ScrollView -
i'm trying draw in scrollview on top of image using multi-touch. circles drawn, under image. in code create custom scrollview:
@interface appscrollview : uiscrollview {
//objects draw circles nsmutabledictionary *circlesinprocess; nsmutablearray *completecircles;
}
@end
in appscrollview.m override touches commands store touches , add
(void)drawrect:(cgrect) rect
method draw circles in scrollview. include
[self setneedsdisplay]
to display circles. in app controller, declare new custom scrollview object:
iboutlet appscrollview *scrollview;
later add image scrollview using:
[scrollview addsubview:myimage];
the image visible, when try draw circles on top of it, drawn under image. let me know if have suggestions?
suggestion: draw image onto scrollview (instead of adding image view subview) , draw circles on top of that.
Comments
Post a Comment