undo top labels bottom buttons view changes molecule delegates and spacing blocks Primary Button Molecule remove module name from swift files.
56 lines
2.7 KiB
Objective-C
56 lines
2.7 KiB
Objective-C
//
|
|
// PrimaryButtonView.h
|
|
// myverizon
|
|
//
|
|
// Created by Scott Pfeil on 12/11/15.
|
|
// Copyright © 2015 Verizon Wireless. All rights reserved.
|
|
//
|
|
|
|
#import <UIKit/UIKit.h>
|
|
#import <MVMCoreUI/ViewConstrainingView.h>
|
|
#import <MVMCoreUI/PrimaryButton.h>
|
|
|
|
@interface PrimaryButtonView : ViewConstrainingView
|
|
|
|
// Set when there is one button or it is the right button when there are two.
|
|
@property (nullable, weak, nonatomic) PrimaryButton *primaryButton;
|
|
|
|
// The left button when there are two buttons.
|
|
@property (nullable, weak, nonatomic) PrimaryButton *secondaryButton;
|
|
|
|
// Inits with a single button.
|
|
- (nonnull instancetype)initButtonSmall:(BOOL)small enabled:(BOOL)enabled;
|
|
|
|
// Inits with two buttons.
|
|
- (nonnull instancetype)initWithTwoButtons;
|
|
|
|
// Inits with whatever is in the passed in button map. (could be 0, 1, or 2 buttons)
|
|
- (nonnull instancetype)initButtonSmall:(BOOL)small buttonMap:(nullable NSDictionary *)buttonMap actionDelegate:(nullable NSObject <MVMCoreActionDelegateProtocol>*)actionDelegate additionalData:(nullable NSDictionary *)additionalData buttonDelegate:(nullable id <ButtonDelegateProtocol>)buttonDelegate;
|
|
- (nonnull instancetype)initWithPrimaryButtonMap:(nullable NSDictionary *)primaryButtonMap secondaryButtonMap:(nullable NSDictionary *)secondaryButtonMap actionDelegate:(nullable NSObject <MVMCoreActionDelegateProtocol>*)actionDelegate additionalData:(nullable NSDictionary *)additionalData buttonDelegate:(nullable id <ButtonDelegateProtocol>)buttonDelegate;
|
|
|
|
// Sets up with whatever is in the passed in button map. (could be 0, 1, or 2 buttons)
|
|
- (void)setupWithButtonMap:(nullable NSDictionary *)buttonMap actionDelegate:(nullable NSObject <MVMCoreActionDelegateProtocol>*)actionDelegate additionalData:(nullable NSDictionary *)additionalData buttonDelegate:(nullable id <ButtonDelegateProtocol>)buttonDelegate;
|
|
- (void)setupWithPrimaryButtonMap:(nullable NSDictionary *)primaryButtonMap secondaryButtonMap:(nullable NSDictionary *)secondaryButtonMap actionDelegate:(nullable NSObject <MVMCoreActionDelegateProtocol>*)actionDelegate additionalData:(nullable NSDictionary *)additionalData buttonDelegate:(nullable id <ButtonDelegateProtocol>)buttonDelegate;
|
|
|
|
// Sets up with two buttons.
|
|
- (void)setupWithTwoButtons;
|
|
|
|
// For subclassing, just returns the button.
|
|
- (nonnull id)createButton;
|
|
|
|
// Change the alignment of the button
|
|
- (void)alignLeft;
|
|
- (void)alignCenter;
|
|
- (void)alignRight;
|
|
- (void)alignFill;//default behavior
|
|
|
|
// Show/hide left and right primary buttons. This does not impact the vertical space of the view.
|
|
- (void)hidePrimaryLeftButton;
|
|
- (void)hidePrimaryRightButton;
|
|
- (void)showBothPrimaryButtons;
|
|
- (void)hideBothPrimaryButtons;
|
|
|
|
- (void)removeSubviews;
|
|
|
|
@end
|