1
votes

I'm building a custom UIView for some custom drawing. So I subclassed UIView - MyUICustomView --.

Into this UIView's drawRect method, I'd like to programmatically include another view - MyMovingView - inside which I want to draw some CG graphics, then move that new drawn subview around inside my main view (the one that MyUICustomView own).

1
Can you specify what you're having trouble with? - Tom Irving

1 Answers

2
votes
Step 1) Create two views, MyUICustomView and MyMovingView
Step 2) Add MyMovingView to MyUICustomView
Step 3) In MyMovingView add custom drawing routines (CGGraphics) to drawRect
Step 4) In MyUICustomView add UIGestureRecognizer routines to move MyMovingView around

Pretty Simple. (A generic answer for a generic question). If you'd like to be more specific we can provide some more detail.