Iphone页面卷曲效果

7 iphone

我正在使用此代码用于页面卷曲效果....它在模拟器和设备中工作正常......但它不是(setType:@"pageCurl")苹果记录的api,这导致它被iPhone开发人员计划拒绝App Store审核流程:

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"]; 
Run Code Online (Sandbox Code Playgroud)

所以我改变并使用这样的方式

[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];
Run Code Online (Sandbox Code Playgroud)

在上面的代码中,我想在中途停止页面卷曲效果..但我不能在中途停止它像ipod中的地图应用程序...这是否有任何修复?或是否有任何苹果记录的方法用于ipod touch中的页面卷曲效果?

我正在寻找很多.但没有得到任何答案?谁能帮我?在此先感谢..plz

小智 9

如果允许我的话?

SampleViewController *sampleView = [[[SampleViewController alloc] init] autorelease];
[sampleView setModalTransitionStyle:UIModalTransitionStylePartialCurl];
[self presentModalViewController:sampleView animated:YES];
Run Code Online (Sandbox Code Playgroud)

......


ken*_*ytm 1

必须使用中点停止卷页效果吗?最简单的方法是用更简单的动画(例如滑出)代替页面卷曲,或者只是将整个视图卷起来。

您可以尝试通过在运行时构造字符串来作弊,例如

[animation setType:[@"page" stringByAppendingString:@"Curl"]];
Run Code Online (Sandbox Code Playgroud)

尽管您仍在使用未记录的方法。