CATransaction disableActions
+ (BOOL)disableActions
Return Value
YES if actions are disabled.
Discussion of [CATransaction disableActions]
This is a convenience method that returns the boolValue for the valueForKey: value returned by the kCATransactionDisableActions key.
CATransaction disableActions example.
-(void)flagsChanged:(NSEvent *)theEvent
{
CALayer* layer = self.layer;
[CATransaction begin];
CATransaction.disableActions = YES;
layer.speed = (theEvent.modifierFlags & NSShiftKeyMask) ? 0.1 : 1;
[CATransaction commit];
}
{
CALayer* layer = self.layer;
[CATransaction begin];
CATransaction.disableActions = YES;
layer.speed = (theEvent.modifierFlags & NSShiftKeyMask) ? 0.1 : 1;
[CATransaction commit];
}
Example of [CATransaction disableActions].
- (void)carouselDidEndScrollingAnimation:(iCarousel *)carousel {
BOOL previousDisableActions = [CATransaction disableActions];
[CATransaction setDisableActions:NO];
// Begin animation here.
[CATransaction setDisableActions:previousDisableActions];
}
BOOL previousDisableActions = [CATransaction disableActions];
[CATransaction setDisableActions:NO];
// Begin animation here.
[CATransaction setDisableActions:previousDisableActions];
}