diff --git a/MVMCoreUI/LegacyControllers/TopLabelsAndBottomButtonsTableViewController.h b/MVMCoreUI/LegacyControllers/TopLabelsAndBottomButtonsTableViewController.h index dd5dd3be..b9beb281 100644 --- a/MVMCoreUI/LegacyControllers/TopLabelsAndBottomButtonsTableViewController.h +++ b/MVMCoreUI/LegacyControllers/TopLabelsAndBottomButtonsTableViewController.h @@ -71,6 +71,6 @@ - (BOOL)bottomViewOutsideOfScroll; //override for setting attributed headline and message -(void)setHeadlineAndMessage; -- (nullable NSArray *)topAccessoryViews; +- (nullable UIView *)topAccessoryView; @end diff --git a/MVMCoreUI/LegacyControllers/TopLabelsAndBottomButtonsTableViewController.m b/MVMCoreUI/LegacyControllers/TopLabelsAndBottomButtonsTableViewController.m index fe83351b..db1b7e5a 100644 --- a/MVMCoreUI/LegacyControllers/TopLabelsAndBottomButtonsTableViewController.m +++ b/MVMCoreUI/LegacyControllers/TopLabelsAndBottomButtonsTableViewController.m @@ -71,19 +71,7 @@ } } -- (nullable NSArray *)topAccessoryViews { - return nil; -} - -- (nullable UIView *)setUpTopAccessoryView { - NSArray *accessoryViews = [self topAccessoryViews]; - if (accessoryViews.count) { - UIView *topAccessoryView = [MVMCoreUICommonViewsUtility commonView]; - [StackableViewController populateView:topAccessoryView withUIArray:accessoryViews withSpacingBlock:^UIEdgeInsets(id _Nullable object) { - return UIEdgeInsetsZero; - }]; - return topAccessoryView; - } +- (nullable UIView *)topAccessoryView { return nil; } @@ -270,7 +258,7 @@ [header addSubview:topView]; [header addSubview:headerAccessoryView]; - UIView *topAccessoryView = [self setUpTopAccessoryView]; + UIView *topAccessoryView = [self topAccessoryView]; self.topAccessoryView = topAccessoryView; if (topAccessoryView) { [header addSubview:topAccessoryView]; diff --git a/MVMCoreUI/LegacyControllers/TopLabelsAndBottomButtonsViewController.h b/MVMCoreUI/LegacyControllers/TopLabelsAndBottomButtonsViewController.h index 406fda1a..ab9823b8 100644 --- a/MVMCoreUI/LegacyControllers/TopLabelsAndBottomButtonsViewController.h +++ b/MVMCoreUI/LegacyControllers/TopLabelsAndBottomButtonsViewController.h @@ -38,7 +38,7 @@ #pragma mark - Subclass -- (nullable NSArray *)topAccessoryViews; +- (nullable UIView *)topAccessoryView; // Allow you to add any additional ui before buildViewsBetweenLabelsAndButtons gets called. Can use this to set the topBetweenEdgeView or bottomBetweenEdgeView - (void)buildInAdditionalViewsBeforeCenteredContent; diff --git a/MVMCoreUI/LegacyControllers/TopLabelsAndBottomButtonsViewController.m b/MVMCoreUI/LegacyControllers/TopLabelsAndBottomButtonsViewController.m index d7c1ca41..95c0e26e 100644 --- a/MVMCoreUI/LegacyControllers/TopLabelsAndBottomButtonsViewController.m +++ b/MVMCoreUI/LegacyControllers/TopLabelsAndBottomButtonsViewController.m @@ -118,7 +118,7 @@ [self.contentView addSubview:topView]; [NSLayoutConstraint activateConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|-0-[topView]-0-|" options:NSLayoutFormatDirectionLeadingToTrailing metrics:nil views:NSDictionaryOfVariableBindings(topView)]]; - UIView *topAccessoryView = [self setUpTopAccessoryView]; + UIView *topAccessoryView = [self topAccessoryView]; self.topAccessoryView = topAccessoryView; if (topAccessoryView) { [self.contentView addSubview:topAccessoryView]; @@ -280,24 +280,7 @@ } } -- (nullable NSArray *)topAccessoryViews { - return nil; -} - -- (nullable UIView *)setUpTopAccessoryView { - NSArray *accessoryViews = [self topAccessoryViews]; - if (accessoryViews.count) { - UIView *topAccessoryView = [MVMCoreUICommonViewsUtility commonView]; - - __block typeof(self) weakSelf = self; - [StackableViewController populateView:topAccessoryView withUIArray:accessoryViews withSpacingBlock:^UIEdgeInsets(id _Nullable object) { - UIEdgeInsets edgeInsets = [weakSelf spaceAroundUIObject:object]; - edgeInsets.left = 0; - edgeInsets.right = 0; - return edgeInsets; - }]; - return topAccessoryView; - } +- (nullable UIView *)topAccessoryView { return nil; }