views:

174

answers:

1

I'm using following code to show curlup animation. It generally curls up from right side. But I want curl up from left side. How can I get this.

My code is as follows:

[UIView beginAnimations:nil context:nil];
[UIView setAnimationCurve:UIViewAnimationCurveLinear];
[UIView setAnimationDuration:1];
if(dirString == kCATransitionFromTop)
{
    [UIView setAnimationTransition:UIViewAnimationTransitionCurlUp forView:[self view] cache:NO];
}
else if(dirString == kCATransitionFromBottom) 
{
    [UIView setAnimationTransition:UIViewAnimationTransitionCurlDown forView:[self view] cache:NO];
}
[[self view] exchangeSubviewAtIndex:0 withSubviewAtIndex:1];
[UIView commitAnimations];