[UIView animationWithDuration: 2 animations: ^ {
[Imageview setTransform: (CGAffineTransformMakeScale (0.01,0.01))];
[Imageview setAlpha: 0];
}
completion: ^ (BOOL finished) {
[Imageview removeFromSuperview];
}];
Reply:
Use CABasicAnimation to create animation effects. You then check the specific use.
Reply:
Tried the problem does not seem to
Reply:
Is it my simulator problem?
Why am I here is the size of enlarged from 0.01 to the original size!
Reply:
Try code:
[UIView animationWithDuration: 2 animations: ^ {
CGAffineTransform * transform = CGAffineTransformScale (imageView.transform, 0.01, 0.01);
[Imageview setTransform: transform];
[Imageview setAlpha: 0];
}
completion: ^ (BOOL finished) {
[Imageview removeFromSuperview];
}];
This may be considered for conversion of existing imageView.
Another method you can try: UIViewAnimationOptionBeginFromCurrentState, as an option to add to the animation method:
+ (void) animateWithDuration: (NSTimeInterval) duration delay: (NSTimeInterval) delay options: (UIViewAnimationOptions) options animations: (void (^) (void)) animations completion: (void (^ ) (BOOL finished)) completion {
}
Reply:
But the problem may also be the name of your approach is wrong, does not work, then try to put your name to: animateWithDuration
[UIView animateWithDuration: 2 animations: ^ {
Reply:
Problems have been solved and found an IOS issue.
In fact, this movie, I also joined the rotation effect, but found it necessary to give the effect of rotation and then add add imageview zoom effect to work properly, there will be reversed if the two sequential problem mentioned above me, very strange.
I am also doing android development, android do better in this regard, not such a strange phenomenon!
No comments:
Post a Comment