[UIView beginAnimations:nil context:nil]; [UIView setAnimationDuration:0.4]; [UIView setAnimationDelegate:self]; selected.frame =CGRectMake(1024-170,(78-65)/2+8,170,65); [UIView commitAnimations];