mirror of
https://github.com/HackPlan/AsyncDisplayKit.git
synced 2026-04-28 19:55:34 +08:00
Animate relayout in Kittens example
This commit is contained in:
@@ -191,7 +191,17 @@ static const CGFloat kInnerPadding = 10.0f;
|
||||
- (void)toggleNodesSwap
|
||||
{
|
||||
_swappedTextAndImage = !_swappedTextAndImage;
|
||||
[self setNeedsLayout];
|
||||
|
||||
[UIView animateWithDuration:0.15 animations:^{
|
||||
self.alpha = 0;
|
||||
} completion:^(BOOL finished) {
|
||||
[self setNeedsLayout];
|
||||
[self.view layoutIfNeeded];
|
||||
|
||||
[UIView animateWithDuration:0.15 animations:^{
|
||||
self.alpha = 1;
|
||||
}];
|
||||
}];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
Reference in New Issue
Block a user