1
如果您认为此代码将被Apple拒绝,请告诉我。Apple会否拒绝此代码?
CATransition *animation = [CATransition animation];
animation.delegate = self;
animation.duration = 0.3f;
animation.timingFunction = UIViewAnimationCurveEaseInOut;
animation.removedOnCompletion = NO;
if (curlUp)
{
animation.type = @"pageCurl";
animation.fillMode = kCAFillModeForwards;
animation.endProgress = 0.7;
}
else
{
animation.type = @"pageUnCurl";
animation.fillMode = kCAFillModeBackwards;
animation.startProgress = 0.3;
}
// Perform the animation
UIView *whitebg = [self.view viewWithTag:10];
NSInteger purple = [[whitebg subviews] indexOfObject:[whitebg viewWithTag:99]];
NSInteger white = [[whitebg subviews] indexOfObject:[whitebg viewWithTag:100]];
[whitebg exchangeSubviewAtIndex:purple withSubviewAtIndex:white];
[[whitebg layer] addAnimation:animation forKey:@"page curl"];
如果是,那么我怎样才能以另一种方式获得相同的结果?
你是否认为他们会拒绝这段代码是有原因的? – Stormenet 2011-04-30 07:59:28
除非这些动画类型是私有类型,否则可能不是。你为什么不使用相应的系统常量? – 2011-04-30 08:04:03
'animation.fillMode = kCAFillModeForwards; animation.endProgress = 0.7;' – user732184 2011-04-30 08:19:05