mvm_core_ui/MVMCoreUI/Molecules/TopLabelsView.h

53 lines
2.0 KiB
Objective-C

//
// TopLabelsView.h
// mobilefirst
//
// Created by Scott Pfeil on 2/24/16.
// Copyright © 2016 Verizon Wireless. All rights reserved.
//
#import <UIKit/UIKit.h>
#import <MVMCoreUI/MFView.h>
@class Label;
#import <MVMCoreUI/SeparatorView.h>
@class TopLabelsAndBottomButtonsTableViewController;
@interface TopLabelsView : MFView
@property (nullable, weak, nonatomic) Label *headlineLabel;
@property (nullable, weak, nonatomic) Label *messageLabel;
@property (nullable, strong, nonatomic) NSLayoutConstraint *topLabelConstraint;
@property (nullable, weak, nonatomic) NSLayoutConstraint *spaceBetweenLabels;
@property (nullable, weak, nonatomic) NSLayoutConstraint *bottomLabelConstraint;
@property (nullable, weak, nonatomic) TopLabelsAndBottomButtonsTableViewController *tableView;
@property (nullable, strong, nonatomic) SeparatorView *separatorView;//hidden by default
// Use this when using this class as the header in top labels and bottom buttons table view controller. The header has to be set a certain way.
- (nullable instancetype)initWithTableView:(nullable TopLabelsAndBottomButtonsTableViewController *)tableView;
// Shows and hides the top labels.
- (void)showTopLabels;
- (void)hideTopLabels;
- (void)hideBottomLabels;
// Setter for message label
- (void)setMessageString:(nullable NSString *)messageString;
- (void)setMessageAttributedString:(nullable NSAttributedString *)messageString;
// Will adjust spacing as needed.
- (void)setHeadlineString:(nullable NSString *)headlineString messageString:(nullable NSString *)messageString;
- (void)setHeadlineAttributedString:(nullable NSAttributedString *)headlineString messageAttributedString:(nullable NSAttributedString *)messageString;
- (void)setAsLargeHeadline;
// Common styles (make sure to call them after newDataBuildScreen), IMPORTANT: seems most of the screens canceled this style.
- (void)styleMessageLabelBold;
- (void)setLeftConstant:(CGFloat)leftConstant;
- (void)setRightConstant:(CGFloat)rightConstant;
@end