ios - UIView animation completion block not being called -
I have a strange bug on which I worked in the app.
1 - Why can not be said block a UIView animation perfection
2 - Why UIView animation perfection blocks will then be added after being presented a model view?
I have a view that starts after the view controller. They have complete blocks, most of the time the animation meets the blocks, but every time this app goes to the position where the blocks with completion are not called.
In addition, when I present a new visual controller with the current view controller,
once the app has come into this situation, the animation that never completes the blocks again Called, except that when I render the model scene again.
My animation block is basically this:
int i = 0; (See in UIView * self.cellImageViews) {[UIView animateWithDuration: CELL_ANIMATION_DISMISS_DURATION Delay: (i) * CELL_ANIMATION_STAGGER_INTERVAL Option: UIViewAnimationOptionCurveEaseIn Animation: ^ {view.transform = CGAffineTransformTranslate (see transform, 0, CELL_ANIMATION_DISMISS_TRANSLATION); } Closing: ^ (BOOL end) {Anselog (@ "animation completed: i:% d, finished:% d, count% d", i, finish, [self.oldCellImageViews count]) if (ended & amp; ( i == ([self.cellImageViews count] -1)) {NSLog (@ "if the statement was passed"); // My nearing completion block stuff goes here}}]; i ++;}
Try following
[UIView animateWithDuration: CELL_ANIMATION_DISMISS_DURATION delay : (i) * CELL_ANIMATION_STAGGER_INTERVAL options: UIViewAnimationOptionCurveEaseIn Animation: ^ {int i = 0; (in UIView * self.cellImageViews) {view.transform = CGAffineTransformTranslate (the EEP. Transform, 0, CELL_ANIMATION_DISMISS_TRANSLATION); i ++;}} Closing: ^ (BOOL end) {if (finished) {NSLog (@ "if the statement was passed"); // I'm going to be completed block stuff goes here Is}}];
Comments
Post a Comment