animating the frame of a UIButton
cant seem to get it to work... the start and end results are right but the animation doesnt happen... any ideas?
thanks in advance
VIEW DID LOAD
self.thoughtsButton = [UIButton buttonWithType:UIButtonTypeCustom];
[self.thoughtsButton setBackgroundImage:[[UIImage imageNamed:@"button_search.png"] stretchableImageWithLeftCapWidth:320 topCapHeight:21] forState:UIControlStateNormal];
self.thoughtsButton.adjustsImageWhenHighlighted = NO;
[self.thoughtsButton addTarget:self action:@selector(hadAThought) forControlEvents:UIControlEventTouchUpInside];
self.thoughtsButton.frame = CGRectMake(0, 0, self.view.bounds.size.width, 44);
[self.view addSubview:self.thoughtsButton];
hadAThought METHOD
[UIView beginAnimations:nil context:nil];
[UIView setAnimationCurve:UIViewAnimationCurveEaseInOut];
[UIView setAnimationDuration:1.6];
[UIView setAnimationDelay:0.2];
[UIView setAnimationDelegate:self];
[UIView setAnimationDidStopSelector:@selector(displayTextV iew)];
self.thoughtsButton.frame = CGRectMake(0, 0, self.view.bounds.size.width,200);
[UIView commitAnimations];
|