How to move object
i am working on a project in which i have to provide user facility to d开发者_运维问答raw an circle . i have done this part. But new requirement is that user can move it at any his desire position.I have no idea about it.please help me.
Make a subview of UIView. In it, override drawRect: to draw your circle. Add it to a superview that is the size of the screen. Then, give your view a UIPanGestureRecognizer. Set the target/action to a method on your circle view, and in that method set the view's frame to have an origin at the gesture recogniser's locationInView:.
If you need more specific help than this, feel free to post some code that you're having trouble with.
精彩评论