So, to move the comment out - is this generally what you're trying to do?
-(void) calledWhenTimerGoesRound
{
NSLog(@"calledWhenTimerGoesRound");
[UIView beginAnimations:nil context:@"MyAnimation"];
CGRect tempFrame = myButton.frame;
tempFrame.size.width = tempFrame.size.width - 5.0f;
tempFrame.size.height = tempFrame.size.height - 5.0f;
myButton.frame = tempFrame;
[UIView commitAnimations];
}
What does your timer code look like? Here's and example of what should work (resize the button smaller every second):
- (void) startMyTimer
{
NSTimer *timer = [NSTimer timerWithTimeInterval:1 target:self selector:@selector(calledWhenTimerGoesRound) userInfo:nil repeats:YES];
[[NSRunLoop currentRunLoop] addTimer:timer forMode:NSRunLoopCommonModes];
}