removed unneccessary enum and replace with axis
Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
parent
335e2825f0
commit
516674f17e
@ -6,21 +6,18 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
import UIKit
|
||||||
|
|
||||||
struct ButtonGroupConstants {
|
struct ButtonGroupConstants {
|
||||||
static let defaultSpace = 12.0
|
static let defaultSpace = 12.0
|
||||||
|
|
||||||
enum ButtonSpacingAxis {
|
|
||||||
case horizontal, vertical
|
|
||||||
}
|
|
||||||
|
|
||||||
/// This will determine the spacing that will go between 2 ButtonBases either horizontally or vertically
|
/// This will determine the spacing that will go between 2 ButtonBases either horizontally or vertically
|
||||||
/// - Parameters:
|
/// - Parameters:
|
||||||
/// - axis: horizontal/vertical
|
/// - axis: horizontal/vertical
|
||||||
/// - primary: first ButtonBase
|
/// - primary: first ButtonBase
|
||||||
/// - neighboring: next ButtonBase based off of axis
|
/// - neighboring: next ButtonBase based off of axis
|
||||||
/// - Returns: float value
|
/// - Returns: float value
|
||||||
static func getSpacing(for axis: ButtonSpacingAxis, with primary: ButtonBase, neighboring: ButtonBase) -> CGFloat {
|
static func getSpacing(for axis: NSLayoutConstraint.Axis, with primary: ButtonBase, neighboring: ButtonBase) -> CGFloat {
|
||||||
|
|
||||||
//large button
|
//large button
|
||||||
if let button = primary as? Button, button.size == .large {
|
if let button = primary as? Button, button.size == .large {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user