title: Apple rejected app because of animationDidStop:finished:context: is a non-public api
body: <p>Apple rejected my app because: </p>
  
  <blockquote>
    <p>3.3.1 Applications may only use Documented APIs in the manner prescribed by Apple and must not use or call any private APIs.
    Applications must be originally written in Objective-C, C, C++, or
    JavaScript as executed by the iPhone OS WebKit engine, and only code
    written in C, C++, and Objective-C may compile and directly link
    against the Documented APIs (e.g., Applications that link to
    Documented APIs through an intermediary translation or compatibility
    layer or tool are prohibited).</p>
  </blockquote>
  
  <p>The non-public API that is included in your application is <code>animationDidStop:finished:context:</code>.</p>
  
  <p>This is my method in which I am using the call to above mentioned method:</p>
  
  <pre><code>- (void)hideMsg
  {
  
  // Slide the view off screen
  CGRect frame = self.view.frame;
  int retractY;
  int retractX;
  
  [UIView beginAnimations:nil context:NULL];
  [UIView setAnimationDuration:.75];
  
  retractY = -190;
  retractX = 0;
  
  frame.origin.y = retractY;
  frame.origin.x = retractX;
  self.view.frame = frame;
  
  //to autorelease the Msg, define stop selector
  [UIView setAnimationDelegate:self];
  [UIView setAnimationDidStopSelector:@selector(animationDidStop:finished:context:)];
  
  [UIView commitAnimations];
  
  }
  </code></pre>
  
  <p>I'm using this method to display a sliding message after occurence of certain event.</p>
  
  <p>But I have nowhere defined this method. When I tried to find it was only found in CAAnimation.h, UIView.h.</p>
  
  <p>Has anybody encountered with the same problem? How did you fix it?</p>