after animation, perspective position resets
i am perplexing perspective slip tip bottom. large deal, i used cabasicanimation this. problem i wish mislay view. i animation.
cabasicanimation *animation;
animation = [cabasicanimation animationwithkeypath:@"position"];
[animation setdelegate:self];
animation.tovalue = [nsvalue valuewithcgpoint:cgpointmake(self.view.layer.position.x, 0 - self.view.bounds.size.height / 2)];
animation.fromvalue = [nsvalue valuewithcgpoint:self.view.layer.position];
animation.autoreverses = no;
animation.repeatcount = 0;
animation.duration = 0.25;
animation.timingfunction = [camediatimingfunction functionwithname: kcamediatimingfunctioneaseineaseout];
[self.view.layer addanimation:animation forkey:@"movex"];
which animates perspective perfectly. but, after animation finishes, perspective appears again. i total line :
[self.view removefromsuperview];
which removes view, nonetheless animation. i solid supplement mislay formula delegate:
-(void) animationdidstop:(caanimation *) animation finished:(bool) flag
so now, animation works, perspective disappears, nonetheless sometimes, i perspective seem disappear faster, after animation, perspective appears, following animationdidstop nominee called, perspective disappears, apparently awful. am i doing wrong?
Comments
Post a Comment