I think you need to add : to the @selector(buttonClicked:) operator, since IBAction expects one attribute of the (id)sender method.
You can do something similar to the code below.
- (void)buttonClicked:(id)sender { CGRect frame = button.frame; frame.origin.x = 500;
If you want to animate it, you can add a beginAnimation block.
- (void)buttonClicked:(id)sender { CGRect frame = button.frame; frame.origin.x = 500;
source share