diff --git a/MVMCore/MVMCore/MainProtocols/MVMCoreViewManagerViewControllerProtocol.h b/MVMCore/MVMCore/MainProtocols/MVMCoreViewManagerViewControllerProtocol.h index 962a689..70b8c4b 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 (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; // Notifies the current showing view controller that the manager is disappearing. - (void)managerWillDisappear:(nonnull NSObject *)manager; +// 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