tags:

views:

1686

answers:

5

I am using this code for Page curl effect ....Its work fine in simulator and device... But its not (setType:@"pageCurl") apple documented api , this caused it to be rejected by the iPhone Developer Program during the App Store review process:

animation = [CATransition animation];
[animation setDelegate:self];
[animation setDuration:1.0f];
animation.startProgress = 0.5;
animation.endProgress   = 1;
[animation setTimingFunction:UIViewAnimationCurveEaseInOut];
[animation setType:@"pageCurl"];
[animation setSubtype:@"fromRight"];
[animation setRemovedOnCompletion:NO];
[animation setFillMode: @"extended"];
[animation setRemovedOnCompletion: NO];
[[imageView layer] addAnimation:animation 
                         forKey:@"pageFlipAnimation"]; 

So i changed and using like this

[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:1];
[UIView setAnimationDelegate:self];
[UIView setAnimationBeginsFromCurrentState:YES];
[UIView setAnimationCurve:UIViewAnimationCurveLinear];
[UIView setAnimationWillStartSelector:@selector(transitionWillStart:finished:context:)];
[UIView setAnimationDidStopSelector:@selector(transitionDidStop:finished:context:)];
// other animation properties
[UIView setAnimationTransition:UIViewAnimationTransitionCurlUp 
                       forView:imageView cache:YES];
// set view properties
[UIView commitAnimations];

In this above code i want to stop the page curl effect at midway.. But i cant stop it in midway like map applications in ipod... Is this any fix for this? or Is there any apple documented methods used for page curl effect in ipod touch?

I am searching lot. but didnt get any answer ? can anyone help me? Thanks in advance..plz

+1  A: 

Must the stop-at-mide-point page curl effect be used? The easiest method is to replace page curl by a simpler animation (e.g. slide-out), or just curl the whole view up.

You may try to cheat by constructing the string at run time e.g.

[animation setType:[@"page" stringByAppendingString:@"Curl"]];

although you're still using an undocumented method.

KennyTM
I wonder if this would slip through the cracks… Does anybody have experience in doing this?
coneybeare
+1  A: 

Check this similar question - http://stackoverflow.com/questions/2646714/what-iphone-os-apis-could-i-use-to-implement-a-transition-animation-similar-to-th/3606358. I have post my answer there.

Sagar
A: 

Hello there. So u did use the type @pagecurl and the app got rejected?

A: 

If I may?

SampleViewController *sampleView = [[[SampleViewController alloc] init] autorelease]; [sampleView setModalTransitionStyle:UIModalTransitionStylePartialCurl]; [self presentModalViewController:sampleView animated:YES];

Chris Pemberton
A: 

Partial curling is officially supported since SDK 3.2. Check the sample code of Chris. More information can be found in the UIViewController Class Reference under Constants.

Jan
This does not appear to function the same as Maps. That is to say you can apply this transition to the whole view, but not a subview and therefore leaving the toolbar.
Jason McCreary