# Conflicts: # MVMCoreUI.xcodeproj/project.pbxproj # MVMCoreUI/Atoms/Views/MFLabel.h # MVMCoreUI/Atoms/Views/MFLabel.m
77 lines
3.8 KiB
Objective-C
77 lines
3.8 KiB
Objective-C
//
|
|
// TopLabelsAndBottomButtonsViewController.h
|
|
// myverizon
|
|
//
|
|
// Created by Scott Pfeil on 1/26/16.
|
|
// Copyright © 2016 Verizon Wireless. All rights reserved.
|
|
//
|
|
// Has top labels docked on top, buttons docked on bottom, and anything you'd like in between when subclassed.
|
|
|
|
#import <MVMCoreUI/StackableViewController.h>
|
|
#import <MVMCoreUI/ViewConstrainingView.h>
|
|
#import <MVMCoreUI/TopLabelsView.h>
|
|
@class LabelView;
|
|
@class PrimaryButton;
|
|
|
|
@interface TopLabelsAndBottomButtonsViewController : StackableViewController
|
|
|
|
@property (nullable, weak, nonatomic) TopLabelsView *topLabelsView;
|
|
@property (nullable, weak, nonatomic) PrimaryButton *primaryButton;
|
|
@property (nullable, weak, nonatomic) PrimaryButton *secondaryButton;
|
|
@property (nullable, weak, nonatomic, readonly) UIView *bottomView;
|
|
@property (nullable, weak, nonatomic, readonly) UIView *topView;
|
|
@property (nullable, weak, nonatomic) UIView *viewInScroll;
|
|
@property (nullable, weak, nonatomic) UIView *viewOutOfScroll;
|
|
@property (nullable, strong, nonatomic) UIView *safeAreaView;
|
|
@property (nullable, weak, nonatomic) ViewConstrainingView *bottomAccessoryView;
|
|
|
|
// Set to overwrite which view is the top edge and/or bottom edge of the between view. must be added to the ui and constrained before buildViewsBetweenLabelsAndButtons.
|
|
// Use these to create views that are pinned near the labels or buttons and are separate from any centered content. Add and set in buildInAdditionalViewsBeforeCenteredContent.
|
|
@property (nullable, weak, nonatomic) UIView *topBetweenEdgeView;
|
|
@property (nullable, weak, nonatomic) UIView *bottomBetweenEdgeView;
|
|
|
|
// The constraint connecting the topLabelsView to the content view.
|
|
@property (nullable, strong, nonatomic) NSLayoutConstraint *topConstraintForTopView;
|
|
|
|
// Can override. This is put in because to cover 90% of the screens for initial ipad release, need to rebuild ui (newDataBuildScreen) of size of view change in updateViews. Disable this to handle manually with more finess.
|
|
@property (nonatomic) BOOL rebuildUIOnSizeChange;
|
|
|
|
#pragma mark - Subclass
|
|
|
|
// Allow you to add any additional ui before buildViewsBetweenLabelsAndButtons gets called. Can use this to set the topBetweenEdgeView or bottomBetweenEdgeView
|
|
- (void)buildInAdditionalViewsBeforeCenteredContent;
|
|
// For subclassing. Should return all the views that will be in between labels and buttons. Override standardSpaceAroundUIObject to handle spacing.
|
|
- (nullable NSArray <UIView *>*)buildViewsBetweenLabelsAndButtons;
|
|
|
|
//*********
|
|
// If both are subclassed to return a value, then the buttons will not be pinned towards the bottom.
|
|
|
|
// If anything is returned, the class will fill in the space between the top labels and views with the passed in value.
|
|
- (nullable NSNumber *)spaceAboveBetweenView;
|
|
|
|
// If anything is returned, the class will fill in the space between the views and bottom buttons with the passed in value.
|
|
- (nullable NSNumber *)spaceBelowBetweenView;
|
|
|
|
// Can overwrite the default padding for labels and buttons.
|
|
- (UIEdgeInsets)paddingForTopLabels;
|
|
- (UIEdgeInsets)paddingForBottomButtons;
|
|
|
|
// default button map will automatically get from response, you can also overide this to have your own button map
|
|
- (nullable NSDictionary *)secondaryButtonMap;
|
|
- (nullable NSDictionary *)primaryButtonMap;
|
|
|
|
// Should not sub class it, for most cases, the headline and message will be in page map, but who knows how server wants to send them in certain pages
|
|
- (nullable NSDictionary *)mapForTopLabels;
|
|
|
|
// Use these if you want to replace the top labels or bottom button views with your own views.
|
|
- (nullable UIView *)useCustomViewInsteadOfLabels;
|
|
- (nullable UIView *)useCustomViewInsteadOfButtons;
|
|
|
|
// Can override if the buttons should be outside of the scroll or not. Default is no.
|
|
- (BOOL)bottomViewOutsideOfScroll;
|
|
|
|
// Build above the button view
|
|
- (nullable UIView *)buttonsAccessoryView;
|
|
|
|
@end
|