please help someone. i have a simple UIButton that was doing its job fine until i animated it to go from left to right on the screen. when i try to press the button while it's moving nothing happens. : [
h. file
m. file
h. file
Code:
@interface.... {
UIButton *button;
}
@property (nonatomic, retain) IBOutlet UIButton *button;
-(IBAction)action;
@end
m. file
Code:
// the button is placed in interface builder at an x coordinate of -50.
-(void)viewDidLoad {
[UIView beginAnimations:@"ButtonMove" context:nil];
[UIView setAnimationDuration:6.0];
[UIView setAnimationRepeatCount:10];
CGPoint center = Button.center;
if (center.x < 10) {
center.x += 540.0f;
}
stickButton.center = center;
[UIView commitAnimations];