diff --git a/MVMCoreUI/BaseControllers/MFViewController.h b/MVMCoreUI/BaseControllers/MFViewController.h index de661356..8d5c6678 100644 --- a/MVMCoreUI/BaseControllers/MFViewController.h +++ b/MVMCoreUI/BaseControllers/MFViewController.h @@ -29,6 +29,7 @@ #import @class MainMenuViewController; +@class MVMCoreUITabBarPageControlViewController; @class MVMAnimationManager; @interface MFViewController : UIViewController @@ -58,7 +59,10 @@ @property (nullable, strong, nonatomic) NSString *pageType; // Set if this page is containted in a manager. -@property UIViewController *manager; +@property (nullable, weak, nonatomic) UIViewController *manager; + +// Convenience for mf. Set if this page is containted in a tab bar page control. +@property (nullable, weak, nonatomic) MVMCoreUITabBarPageControlViewController *tabBarPageControl; /* The bottom progress view that is shown in the shop flow */ @property (nullable, nonatomic, strong) UIProgressView *progressView; diff --git a/MVMCoreUI/BaseControllers/MFViewController.m b/MVMCoreUI/BaseControllers/MFViewController.m index 10fa557e..4347f6ea 100644 --- a/MVMCoreUI/BaseControllers/MFViewController.m +++ b/MVMCoreUI/BaseControllers/MFViewController.m @@ -34,6 +34,7 @@ #import "MVMCoreUIConstants.h" #import "MVMCoreUISession.h" #import "MVMCoreUILoggingHandler.h" +#import "MVMCoreUITabBarPageControlViewController.h" @import MVMAnimationFramework; @@ -723,6 +724,13 @@ [self adobeTrackPageState]; } +- (void)setManager:(UIViewController *)manager { + _manager = manager; + if ([manager isKindOfClass:MVMCoreUITabBarPageControlViewController.class]) { + self.tabBarPageControl = (MVMCoreUITabBarPageControlViewController *)manager; + } +} + #pragma mark - adobe analytics - (nullable NSArray *)additionalActionsToTrackWithMainActionInformation:(nullable NSDictionary *)actionInformation additionalData:(nullable NSDictionary *)additionalData {