os5 openFlow解决办法


2011-11-28 16:52

上代码

 

1 AfOpenFlowView.m 

 

修改 -(void)setUpInitialState...

{

修改

leftTransform = CATransform3DIdentity;

leftTransform = CATransform3DRotate(leftTransform, SIDE_COVER_ANGLE, 0.0f, 1.0f, 0.0f);

rightTransform = CATransform3DIdentity;

rightTransform = CATransform3DRotate(rightTransform, SIDE_COVER_ANGLE, 0.0f, -1.0f, 0.0f);

 

leftTransform =CATransform3DTranslate(CATransform3DIdentity,0,0, SIDE_COVER_ZPOSITION /2.0);

leftTransform =CATransform3DRotate(leftTransform, SIDE_COVER_ANGLE,0.0f,1.0f,0.0f);

rightTransform =CATransform3DTranslate(CATransform3DIdentity,0,0, SIDE_COVER_ZPOSITION /2.0);

rightTransform =CATransform3DRotate(rightTransform, SIDE_COVER_ANGLE,0.0f,-1.0f,0.0f);

}

-layoutCover:selectedCover:animated..

{

添加

CGFloat newZPosition = SIDE_COVER_ZPOSITION /2.0;

添加

CABasicAnimation*zPositionAnimation =[CABasicAnimation animationWithKeyPath:@"zPosition"];

[zPositionAnimation setToValue:[NSNumber numberWithFloat:newZPosition]];

[zPositionAnimation setDuration:(animated ?.3:0.0)];

[zPositionAnimation setTimingFunction:[CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut]];

[zPositionAnimation setRemovedOnCompletion:NO];

[zPositionAnimation setFillMode:kCAFillModeForwards];

修改

aCover.layer.zPosition = newZPosition;

为 [aCover.layer addAnimation:zPositionAnimation forKey:nil];

}

使用 ios4 ios5

你可能感兴趣的:(ios,OS,ios5)