From ee87695fc89c4860ae61a137b56ef2d032bc7107 Mon Sep 17 00:00:00 2001 From: Michael Schneider Date: Mon, 15 Aug 2016 17:23:02 -0700 Subject: [PATCH] Don't use the default layout transition animation of no animation is wanted (#2075) --- AsyncDisplayKit/ASDisplayNode.mm | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/AsyncDisplayKit/ASDisplayNode.mm b/AsyncDisplayKit/ASDisplayNode.mm index fbcf0396d8..d340108403 100644 --- a/AsyncDisplayKit/ASDisplayNode.mm +++ b/AsyncDisplayKit/ASDisplayNode.mm @@ -893,8 +893,14 @@ static ASDisplayNodeMethodOverrides GetASDisplayNodeMethodOverrides(Class c) */ - (void)animateLayoutTransition:(id)context { + if ([context isAnimated] == NO) { + [self __layoutSublayouts]; + [context completeTransition:YES]; + return; + } + ASDisplayNode *node = self; - + NSAssert(node.isNodeLoaded == YES, @"Invalid node state"); NSAssert([context isAnimated] == YES, @"Can't animate a non-animatable context");