updated to var

Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
Matt Bruce 2024-10-17 16:15:50 -05:00
parent 4484034b4c
commit 1e7b3acc42

View File

@ -45,7 +45,7 @@ open class TileletGroup: View {
public enum Padding: String, CaseIterable {
case standard, compact
private func value() -> CGFloat {
var value: CGFloat {
switch self {
case .standard:
return UIDevice.isIPad ? 40.0 : VDSLayout.space3X
@ -54,9 +54,9 @@ open class TileletGroup: View {
}
}
func horizontalValue() -> CGFloat { value() }
func horizontalValue() -> CGFloat { value }
func verticalValue() -> CGFloat { value() }
func verticalValue() -> CGFloat { value }
}
//--------------------------------------------------
@ -72,7 +72,7 @@ open class TileletGroup: View {
open var rowQuantityTablet: Int = 4 { didSet { updateRows() } }
/// An object containing number of Button components per row
open var rowQuantity: Int { UIDevice.isIPad ? rowQuantityTablet : rowQuantityPhone }
open var rowQuantity: Int { UIDevice.isIPad ? min(rowQuantityTablet,6) : min(rowQuantityPhone, 3) }
open var tilelets: [Tilelet] = [] { didSet { updateRows() } }