moving UITextField in UIView
<p>i am using UITextField on my UIView and need to drag UITextField with my pointer on my UIView but its not working!! here is my code: </p>

<pre><code>- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event{
[UIView beginAnimations:@"Move" context:nil];
[UIView setAnimationDuration:1];
[UIView setAnimationBeginsFromCurrentState:YES];
UITouch *touch = [[event allTouches] anyObject];
mytextField.center = [touch locationInView:myView];
[UIView commitAnimations]; }

- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event{
UITouch *touch = [touches anyObject];
mytextField.center = [touch locationInView:myView];}

- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event{}
</code></pre>
