// // PrimaryButtonView.h // myverizon // // Created by Scott Pfeil on 12/11/15. // Copyright © 2015 Verizon Wireless. All rights reserved. // #import #import #import @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; // Legacy: Sets up 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 *)actionDelegate additionalData:(nullable NSDictionary *)additionalData buttonDelegate:(nullable id )buttonDelegate; - (nonnull instancetype)initWithPrimaryButtonMap:(nullable NSDictionary *)primaryButtonMap secondaryButtonMap:(nullable NSDictionary *)secondaryButtonMap actionDelegate:(nullable NSObject *)actionDelegate additionalData:(nullable NSDictionary *)additionalData buttonDelegate:(nullable id )buttonDelegate; - (void)setupWithButtonMap:(nullable NSDictionary *)buttonMap actionDelegate:(nullable NSObject *)actionDelegate additionalData:(nullable NSDictionary *)additionalData buttonDelegate:(nullable id )buttonDelegate; - (void)setupWithPrimaryButtonMap:(nullable NSDictionary *)primaryButtonMap secondaryButtonMap:(nullable NSDictionary *)secondaryButtonMap actionDelegate:(nullable NSObject *)actionDelegate additionalData:(nullable NSDictionary *)additionalData buttonDelegate:(nullable id )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