why is setAnimationDidStopSelector discouraged?

i saw the following in apples documentation on setAnimationDidStopSelector:

“Use of this method is discouraged in iOS 4.0 and later. If you are using the block-based animation methods, you can include your delegate‚Äôs end code directly inside your block.”

  • Being apprised of when NSStatusItem is hidden
  • close (minimize) app from code
  • How to customize the error handling when user choose not to purchase an item in iOS InApp Purchase?
  • Is it possible to recover my deleted xcdatamodel file?
  • How to change the tab bar image color for selected and unselected
  • how to select viewcontroller based on selection done
  • I tried adding what I was going to put inside the animation stop delegate inside the animation block, but the animation doesn’t look the same as when i used setAnimationDidStopSelector.

    What is the reason for discouraging the use of setAnimationDidStopSelector?

    Solutions Collect From Internet About “why is setAnimationDidStopSelector discouraged?”

    There are lots of APIs that get deprecated in Cocoa Touch. The framework is fairly young and Apple is still tweaking the underlying code. When it is phrased as in your question it probably means “we are going to put all our effort into making block animations perfect, setAnimationDidStopSelector will at some time in the future be deprecated – do yourself a favor and stop using it now”.

    It sounds weird that your animation behaves different? Have you done it like this?

        [UIView animateWithDuration:1.0
            delay: 0.0
            options: UIViewAnimationOptionCurveEaseIn
            animations:^{
                 aView.alpha = 0.0;
            }
            completion:^(BOOL finished){
                // Do your setAnimationDidStopSelector stuff here!
            }];