Undocumented Animation Transitions!

Discussion in 'iOS Programming' started by Darkroom, Dec 12, 2009.

  1. Guest


    Dec 15, 2006
    Montréal, Canada
    am i the only person who didn't know about this?

    #define NextPage 101
    #define PreviousPage 102
    #define Suck 103
    #define WaterRipple 110
    //There are a few others also (105, 106, 107, proabably more)
    @implementation TransitionEffectsViewController
    - (void)viewDidLoad
    	UIImageView *transitionView = [[UIImageView alloc] initWithFrame:CGRectMake(50, 100, 200, 300)];
    	transitionView.image = [UIImage imageNamed:@"parot2.jpg"];
    	transitionView.tag = 88;
    	[self.view addSubview:transitionView];
    	[transitionView release];
    	UIButton *transitionButton = [UIButton buttonWithType:UIButtonTypeRoundedRect];
    	[transitionButton addTarget:self action:@selector(animation) forControlEvents:UIControlEventTouchUpInside];
    	[transitionButton setTitle:@"Show Transition" forState:UIControlStateNormal];
    	[transitionButton setFrame:CGRectMake(10, 10, 200, 40)];
    	[self.view addSubview:transitionButton];
    - (void)animation
    	[UIView beginAnimations:nil context:NULL];
    	[UIView setAnimationCurve:UIViewAnimationCurveEaseInOut];
    	[UIView setAnimationDuration:1];
    	[UIView setAnimationTransition:NextPage forView:[self.view viewWithTag:88] cache:NO];
    	[UIView commitAnimations];
    - (void)dealloc
    	[super dealloc];
  2. macrumors 604


    Nov 26, 2007
    I never knew about them, but then I've only used the most basic of transitions in my apps thus far. Thus far my most complicated animation has been having a UIPickerView slide up from the bottom of the screen.
  3. thread starter Guest


    Dec 15, 2006
    Montréal, Canada
    it's too bad the animationTransition:110 is painfully slow when used for a UIImage, although i'm willing to bet it would function without delay on a vector based image.
  4. macrumors 6502a

    Nov 9, 2007
    Given these are undocumented and private you should not be using them in your apps if you plan on distributing them via the app store.

Share This Page