From 495ab78ceaaaa1deeb4e91614713b909a584541e Mon Sep 17 00:00:00 2001 From: "Pfeil, Scott Robert" Date: Fri, 18 Jan 2019 12:10:23 -0500 Subject: [PATCH 1/3] tab bar generic --- .../MVMCoreViewManagerViewControllerProtocol.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/MVMCore/MVMCore/MainProtocols/MVMCoreViewManagerViewControllerProtocol.h b/MVMCore/MVMCore/MainProtocols/MVMCoreViewManagerViewControllerProtocol.h index 962a689..04a884c 100644 --- a/MVMCore/MVMCore/MainProtocols/MVMCoreViewManagerViewControllerProtocol.h +++ b/MVMCore/MVMCore/MainProtocols/MVMCoreViewManagerViewControllerProtocol.h @@ -7,17 +7,23 @@ // // A protocol for view controllers that can be added to a view manager. -#import +#import @protocol MVMCoreViewManagerViewControllerProtocol @optional +// Reference to the manager +@property UIViewController *manager; + // Notifies the view controller that it can be ready (usually means that it's committed to the screen). - (void)viewControllerReadyInManager:(nonnull NSObject *)manager; // Notifies the current showing view controller that the manager is disappearing. - (void)managerWillDisappear:(nonnull NSObject *)manager; +// Can override the standard tab page control to not cache in tab. You should be following proper caching techniques (caching, updating when needed, deleting when needed), so this should be a last resort. +- (BOOL)shouldCacheInTabPageControl; + @end From cefe380aac656551257596c12197093591c272d9 Mon Sep 17 00:00:00 2001 From: "Pfeil, Scott Robert" Date: Wed, 23 Jan 2019 15:06:26 -0500 Subject: [PATCH 2/3] Add back convenience property... --- .../MainProtocols/MVMCoreViewManagerViewControllerProtocol.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MVMCore/MVMCore/MainProtocols/MVMCoreViewManagerViewControllerProtocol.h b/MVMCore/MVMCore/MainProtocols/MVMCoreViewManagerViewControllerProtocol.h index 04a884c..d5bc58f 100644 --- a/MVMCore/MVMCore/MainProtocols/MVMCoreViewManagerViewControllerProtocol.h +++ b/MVMCore/MVMCore/MainProtocols/MVMCoreViewManagerViewControllerProtocol.h @@ -14,7 +14,7 @@ @optional // Reference to the manager -@property UIViewController *manager; +@property (nullable, weak, nonatomic) UIViewController *manager; // Notifies the view controller that it can be ready (usually means that it's committed to the screen). - (void)viewControllerReadyInManager:(nonnull NSObject *)manager; From 81f8a0221bd535321e314c53436786d819413b06 Mon Sep 17 00:00:00 2001 From: "Pfeil, Scott Robert" Date: Wed, 23 Jan 2019 16:06:17 -0500 Subject: [PATCH 3/3] name change --- .../MainProtocols/MVMCoreViewManagerViewControllerProtocol.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/MVMCore/MVMCore/MainProtocols/MVMCoreViewManagerViewControllerProtocol.h b/MVMCore/MVMCore/MainProtocols/MVMCoreViewManagerViewControllerProtocol.h index d5bc58f..70b8c4b 100644 --- a/MVMCore/MVMCore/MainProtocols/MVMCoreViewManagerViewControllerProtocol.h +++ b/MVMCore/MVMCore/MainProtocols/MVMCoreViewManagerViewControllerProtocol.h @@ -22,8 +22,8 @@ // Notifies the current showing view controller that the manager is disappearing. - (void)managerWillDisappear:(nonnull NSObject *)manager; -// Can override the standard tab page control to not cache in tab. You should be following proper caching techniques (caching, updating when needed, deleting when needed), so this should be a last resort. -- (BOOL)shouldCacheInTabPageControl; +// Manager can check if the view controller does not want to be cached. You should be following proper caching techniques (caching, updating when needed, deleting when needed), so this should be a last resort. +- (BOOL)shouldCacheInManager; @end