UIView quesion

Discussion in 'iOS Programming' started by blue-lion, Oct 5, 2014.

  1. blue-lion macrumors member

    Jan 26, 2010
    Hi, Ive got a question about UIView.

    I don't understand how the series of UIView commands (below) know which view to refer to?.

    [UIView beginAnimations:nil context:NULL];
    [UIView setAnimationDuration:0.3];
    pickerContainerView.frame= CGRectMake(0, 600, 320, 304);
    [UIView commitAnimations];
  2. PhoneyDeveloper macrumors 68040


    Sep 2, 2008
    Global variables. Something like this:

    First method -> globalAnimationStarted = YES
    Second method -> globalAnimationDuration = 0.3
    Third method -> if (globalAnimationStarted == YES) add my change to the existing global animation
    Fourth method -> Start the global animation

    Undoubtedly it's more complicated than that but that's the basic idea. If animations can be nested then there's probably a stack of animation objects. These methods push/pop animation objects on/off the stack. But this is the basic idea.

    BTW, those methods shouldn't be used anymore. Use the block based animation methods instead.

Share This Page