I have 4 UIViews inside of a main view controller view. All I need to be able to do is drag the views around the "screen". Is UIScrollView the best option for this, or is there a simpler way?
+1
A:
UIScrollView should be used for scrolling, not dragging. And the 4 scroll views won't work if they're overlapped so don't even think of using UIScrollView in your case.
A dedicate UIView subclass that overrides -touches*****:withEvent:
is needed. See http://github.com/erica/iphone-3.0-cookbook-/tree/master/C08-Gestures/01-Direct%20Manipulation/ for example.
KennyTM
2010-02-13 06:12:31
A:
Apple's Touches sample application contains code that does just this, so you might want to check it out.
Brad Larson
2010-02-13 15:06:24
Ah thanks, that works perfectly
Matt
2010-02-14 00:42:40