clean up
This commit is contained in:
parent
cd5f66875d
commit
89cbfe00ba
@ -71,6 +71,6 @@
|
|||||||
- (BOOL)bottomViewOutsideOfScroll;
|
- (BOOL)bottomViewOutsideOfScroll;
|
||||||
//override for setting attributed headline and message
|
//override for setting attributed headline and message
|
||||||
-(void)setHeadlineAndMessage;
|
-(void)setHeadlineAndMessage;
|
||||||
- (nullable NSArray *)topAccessoryViews;
|
- (nullable UIView *)topAccessoryView;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|||||||
@ -71,19 +71,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
- (nullable NSArray *)topAccessoryViews {
|
- (nullable UIView *)topAccessoryView {
|
||||||
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;
|
|
||||||
}
|
|
||||||
return nil;
|
return nil;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -270,7 +258,7 @@
|
|||||||
[header addSubview:topView];
|
[header addSubview:topView];
|
||||||
[header addSubview:headerAccessoryView];
|
[header addSubview:headerAccessoryView];
|
||||||
|
|
||||||
UIView *topAccessoryView = [self setUpTopAccessoryView];
|
UIView *topAccessoryView = [self topAccessoryView];
|
||||||
self.topAccessoryView = topAccessoryView;
|
self.topAccessoryView = topAccessoryView;
|
||||||
if (topAccessoryView) {
|
if (topAccessoryView) {
|
||||||
[header addSubview:topAccessoryView];
|
[header addSubview:topAccessoryView];
|
||||||
|
|||||||
@ -38,7 +38,7 @@
|
|||||||
|
|
||||||
#pragma mark - Subclass
|
#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
|
// Allow you to add any additional ui before buildViewsBetweenLabelsAndButtons gets called. Can use this to set the topBetweenEdgeView or bottomBetweenEdgeView
|
||||||
- (void)buildInAdditionalViewsBeforeCenteredContent;
|
- (void)buildInAdditionalViewsBeforeCenteredContent;
|
||||||
|
|||||||
@ -118,7 +118,7 @@
|
|||||||
[self.contentView addSubview:topView];
|
[self.contentView addSubview:topView];
|
||||||
[NSLayoutConstraint activateConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|-0-[topView]-0-|" options:NSLayoutFormatDirectionLeadingToTrailing metrics:nil views:NSDictionaryOfVariableBindings(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;
|
self.topAccessoryView = topAccessoryView;
|
||||||
if (topAccessoryView) {
|
if (topAccessoryView) {
|
||||||
[self.contentView addSubview:topAccessoryView];
|
[self.contentView addSubview:topAccessoryView];
|
||||||
@ -280,24 +280,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
- (nullable NSArray *)topAccessoryViews {
|
- (nullable UIView *)topAccessoryView {
|
||||||
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;
|
|
||||||
}
|
|
||||||
return nil;
|
return nil;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user