I am new in iPhone development.
I want to create one application in which whenever user long presses the button, it will be shaken and user is able to drag it on the screen and he will also be able to change its location.
I have tried this code.
- (void)handleLongPress:(UILongPressGestureRecognizer*)sender
{
NSLog(@"Long press called!!!!");
}
Check out the MoveMe sample app. It will show you how to allow movement of subviews by touch and drag.
http://developer.apple.com/library/ios/#samplecode/MoveMe/Introduction/Intro.html
you can also download that sample code … 🙂