From e296cad8ee90933e4b6240b6d92f903cc02da666 Mon Sep 17 00:00:00 2001 From: Garrett Moon Date: Wed, 11 May 2016 16:55:10 -0700 Subject: [PATCH] Add support for visibility depth Summary: This adds support for the concept of visibility depth. Visibility essentially defines the number of user actions it would take a user to have a view controller visible. Knowing a view controllers visibility depth allows view controllers to take action such as clearing out memory that can be restored at a later date. This patch also add two new view controller subclasses which adopt the ASManagesChildVisibilityDepth protocol. Any view controller that has child view controllers can adopt this protocol to indicate to the child what they're visibility is. For example, ASNavigationController will return a visibility depth of it's own visibilityDepth + 1 for a view controller that would be revealed by tapping the back button. Move common implementations to macros Turn off visibility logging Differential Revision: https://phabricator.pinadmin.com/D90395 --- AsyncDisplayKit/ASViewController.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AsyncDisplayKit/ASViewController.mm b/AsyncDisplayKit/ASViewController.mm index 3166eb0726..a79af042e5 100644 --- a/AsyncDisplayKit/ASViewController.mm +++ b/AsyncDisplayKit/ASViewController.mm @@ -13,7 +13,7 @@ #import "ASDisplayNode+Beta.h" #import "ASRangeControllerUpdateRangeProtocol+Beta.h" -#define AS_LOG_VISIBILITY_CHANGES 1 +#define AS_LOG_VISIBILITY_CHANGES 0 @implementation ASViewController {