CATransition and animationDidStop:finished: delegate method.

  • Hello there

    I have successfully set up my view subclass to use CATransition as
    below:

    - (void)updateSubviewsTransition {
    _transition = [CATransition animation];
    [_transition setDelegate:self];
    [_transition setType:kCATransitionFade];
    [_transition setSubtype:kCATransitionFromLeft];
    [_transition setDuration:1.0];
    [self setAnimations:[NSDictionary dictionaryWithObject:_transition
    forKey:@"subviews"]];
    }

    The view subclass receives
    [self setWantsLayer:YES]
    and then
    [[self animator] replaceSubview:[[self subviews] objectAtIndex:0]
    with:newView]
    to animate the replaceSubview.

    I had hoped that when the transition was complete I would receive an
    animationDidStop:finished: on my delegate.
    But this does not seem to occur. Should it?
    I need to set [self setWantsLayer:NO] once the transition is complete
    as the persistent  presence of the layer affects the live resizing
    redraw behaviour of the subviews (NSTableView contents blank out).

    NSTimer is waiting in the wings.

    Regards

    Jonathan
previous month january 2008 next month
MTWTFSS
  1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31      
Go to today