Remove:
while(playButton.center.x != 71)
playButtonTimer = [NSTimer scheduledTimerWithTimeInterval:0.002 target:self selector:@selector(playButtonMove) userInfo:nil repeats:YES];
And add this to your file:
- (void)viewDidAppear:(BOOL)animated {
[UIView animateWithDuration:.25 animations:^{
playButton.center = CGPointMake(71, playButton.center.y);
}];
}
Your app is running forever because you reallocate playbuttontimer before it has a chance to fire. Because of this, your while statement will always be true. Basically all your app is doing right now is creating thousands and thousands of NSTimers until it crashes. What you're doing should not be used for animation. Use apple's built in animation api's.