Merge branch 'feature/atomic_vds_buttonGroup' into feature/vds_batch_two

This commit is contained in:
Matt Bruce 2024-01-26 09:17:50 -06:00
commit a3f940f1cc
3 changed files with 8 additions and 7 deletions

View File

@ -262,7 +262,7 @@ extension MVMCoreUISplitViewController: MVMCoreViewManagerProtocol {
}
public func willDisplay(_ viewController: UIViewController) {
setupPanels()
setupPanels(viewController)
updateState(with: viewController)
}

View File

@ -99,7 +99,7 @@ typedef NS_ENUM(NSInteger, MFNumberOfDrawers) {
- (void)setNavigationIconColor:(nullable UIColor *)color;
/// Updates the panels that are used.
- (void)setupPanels;
- (void)setupPanels:(nullable UIViewController*)viewController;
/// Returns if the left panel is staying extended (usually do to screen size threshold)
- (BOOL)leftPanelStaysExtended;

View File

@ -723,9 +723,9 @@ CGFloat const PanelAnimationDuration = 0.2;
[panel removeFromParentViewController];
}
- (void)setupLeftPanel {
- (void)setupLeftPanel:(nullable UIViewController*)viewController {
UIViewController <MVMCoreUIPanelProtocol> *panel = nil;
UIViewController *currentViewController = [self getCurrentDetailViewController];
UIViewController *currentViewController = viewController ? viewController : [self getCurrentDetailViewController];
if ([currentViewController respondsToSelector:@selector(overrideLeftPanel)]) {
panel = [((UIViewController <MVMCoreUIDetailViewProtocol> *)currentViewController) overrideLeftPanel];
} else {
@ -735,6 +735,7 @@ CGFloat const PanelAnimationDuration = 0.2;
if (!panel) {
[self removePanel:self.leftPanel];
self.leftPanel = nil;
} else if (panel && panel != self.leftPanel) {
[self removePanel:self.leftPanel];
[self addPanel:panel];
@ -795,9 +796,9 @@ CGFloat const PanelAnimationDuration = 0.2;
}
}
- (void)setupPanels {
- (void)setupPanels:(nullable UIViewController*)viewController {
[self forceHideBothDrawers];
[self setupLeftPanel];
[self setupLeftPanel:viewController];
[self setupRightPanel];
self.explictlyShowingPanel = nil;
[self.view layoutIfNeeded];
@ -968,7 +969,7 @@ CGFloat const PanelAnimationDuration = 0.2;
[NSLayoutConstraint constraintWithItem:coverView attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:self.view attribute:NSLayoutAttributeTop multiplier:1.0 constant:0].active = YES;
[NSLayoutConstraint constraintWithItem:self.view attribute:NSLayoutAttributeBottom relatedBy:NSLayoutRelationEqual toItem:coverView attribute:NSLayoutAttributeBottom multiplier:1.0 constant:0].active = YES;
[self setupPanels];
[self setupPanels:nil];
}
- (void)viewDidLoad {