I am currently trying to animation from one view to another using a swipe gesture which in turn would animate View A off the screen to the left and then have view B animate along with it by appear from the right.
This is actually working in my application however when the views animate instead of View B following on the edge of View A and have them both move at the same time, View B will not move untill View A’s animatoin has finished…
this is what the code looks like
- (void)swipedScreen:(UISwipeGestureRecognizer*)gesture
{
if (gesture.direction = UISwipeGestureRecognizerDirectionLeft) {
[UIView animateWithDuration:1.50 animations:^{
// [self.detailViewB.view setAlpha:1.0f];
[self.detailViewB.view setCenter:CGPointMake(CGRectGetMidX(self.view.frame), CGRectGetMidY(self.view.frame))];
[self.detailViewA.view setCenter:CGPointMake(-640, CGRectGetMidY(self.view.frame))];
}];
}
}
And if you would like to compile the source yourself here is a link to the code I am messing around with. http://dl.dropbox.com/u/53813770/SMPrototypeB.zip
any help would be greatly appreciated.
Fixed your code and reuploaded the project here
Changes I made: