Hi all, i'm looking for a way to make the menu system of my (very first) app scroll more smoothly. Currently I've got a panorma type view built in IB that's ~1900px wide by 480 tall image. On top of this are 8 buttons in various places along the view/image, when one of the buttons is selected i update 'xPoint' and call the below to update what's on screen (between 400-600px movement each time a button gets clicked in 1-2 seconds duration):
-(void)moveView:(NSNumber *)duration{ [UIView beginAnimations:nil context:NULL];{ [UIView setAnimationCurve:UIViewAnimationCurveEaseInOut]; [UIView setAnimationDuration:[duration floatValue]]; [UIView setAnimationDelegate:self]; viewRect = self.view.frame; viewRect.origin.x = xPoint; self.view.frame = viewRect; } [UIView commitAnimations]; }
I've set everything in IB to be opaque and have unselected 'Clear context before drawing' for every button/image. On a 3GS this seems smoother than a 3G device but still non-perfect - still getting stuttering on the animation.
Is there a better way to do this? If not is there any way i can optimize/smooth out the movement animation?