Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

kikko088

macrumors member
Original poster
Oct 13, 2010
77
0
Italy
HI at all, I have a little problem, I want to do a page with the effect of Maps like this

http://i.imgur.com/44Hq2.png

I have a page with view-uiwebview and some button.
My method are this:

Code:
- (IBAction)toggleView:(id)sender {

    CATransition *animation = [CATransition animation];
    [animation setDelegate:self.view];
    [animation setDuration:0.7];
    [animation setTimingFunction:UIViewAnimationCurveEaseInOut];
    
	animation.type = @"pageCurl";
    animation.fillMode = kCAFillModeForwards;
    animation.endProgress = 0.58;
	    
    [animation setRemovedOnCompletion:NO];
	[self.vistaWeb.layer addAnimation:animation forKey:@"pageCurlAnimation"];
}

- (IBAction) torna {
	
	CATransition *animation = [CATransition animation];
    [animation setDelegate:self.view];
    [animation setDuration:0.7];
    [animation setTimingFunction:UIViewAnimationCurveEaseInOut];
    
	animation.type = @"pageCurl";
    animation.fillMode = kCAFillModeBackwards;
    animation.startProgress = 0.58;
	animation.endProgress = 0;
	[self.vistaWeb.layer addAnimation:animation forKey:@"pageCurlAnimation"];
}

the problem is that when the page was curled I want to see the view inside the uiwebview.



Uploaded with ImageShack.us

where is the mistake?
thank you!

kikko088
 
No need to make CATransitions etc. it's in the standard ModalView animations.

Code:
 LoginViewController *modalLoginView = [[[LoginViewController alloc] initWithNibName:@"LoginViewController" bundle:nil] autorelease];
        [modalLoginView setModalPresentationStyle:UIModalTransitionStylePartialCurl];
        
        [self.tabBarController presentModalViewController:modalLoginView animated:NO];

and if u pressed button on one of those buttons on second page -->

Code:
 [self dismissModalViewControllerAnimated:NO];

Easy as that
 
Hello, thank you for your answer but I have some question...
with this method I load on my view another controller while I want to apply the animation only to UIWebView, then see the view of the same controller...




kikko088
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.