iOS Animation Block Gesture Recognizer -


i have uicollectionview containing number of cells containing views can drag/dropped out of collection view different view outside collection view. process works fine. however, when dragged view dropped new location, want animate drop scaling drag view full size zero, before removing superview. works in other areas of app when i'm dragging other objects around, 1 1 involving collection view.

[uiview animatewithduration:0.375                  animations:^{ dragview.transform = cgaffinetransformmakescale (1.0f, 1.0f); dragview.transform = cgaffinetransformmakescale(0.0f, 0.0f); }                  completion:^(bool finished) {  [dragview removefromsuperview]; }  ];    

if don't use completion block, animation fails, presumably because view removed before animation finishes. if use completion block, when animation completes, subsequent pan gestures (used scrolling collection view) passed pan gesture recognizer used in view controller other things, instead of scrolling collection view. result, collection view appears "locked up" after animation. if remove completion block, problem gesture recognition doesn't occur afterward, animation doesn't work, either.

i've tried setting userinteractionenabled=yes on collection view after animation, doesn't help.

any suggestions? tia

omg, expect of 2 simultaneous animations of same type? maybe solution?

first animation call:

[uiview animatewithduration:0.375                  animations:^{ dragview.transform = cgaffinetransformmakescale (1.0f, 1.0f); }                  completion:^(bool finished) {  /*call second animation*/ }  ]; 

second animation call:

//second animation [uiview animatewithduration:0.375                  animations:^{ dragview.transform = cgaffinetransformmakescale(0.0f, 0.0f); }                  completion:^(bool finished) {  [dragview removefromsuperview]; }  ];  

Comments