updated enums

Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
Matt Bruce 2023-05-19 16:16:18 -05:00
parent d90045918b
commit 5e229780f5

View File

@ -22,12 +22,12 @@ public struct TabModel {
} }
public class Tabs: View { public class Tabs: View {
public enum Orientation { public enum Orientation: String, CaseIterable{
case vertical case vertical
case horizontal case horizontal
} }
public enum IndicatorPosition { public enum IndicatorPosition: String, CaseIterable {
case top case top
case bottom case bottom
@ -40,12 +40,12 @@ public class Tabs: View {
} }
} }
public enum Overflow { public enum Overflow: String, CaseIterable {
case scroll case scroll
case none case none
} }
public enum Size { public enum Size: String, CaseIterable {
case medium case medium
case large case large
@ -194,7 +194,7 @@ public class Tabs: View {
if orientation == .horizontal { if orientation == .horizontal {
borderLineLayer.frame = CGRect(x: 0, y: bounds.height - 1, width: bounds.width, height: 1) borderLineLayer.frame = CGRect(x: 0, y: bounds.height - 1, width: bounds.width, height: 1)
} else { } else {
borderLineLayer.frame = CGRect(x: bounds.width - 1, y: 0, width: 1, height: bounds.height) borderLineLayer.frame = CGRect(x: 0, y: 0, width: 1, height: bounds.height)
} }
layer.addSublayer(borderLineLayer) layer.addSublayer(borderLineLayer)
@ -222,7 +222,7 @@ public class Tabs: View {
let contentWidth = contentView.systemLayoutSizeFitting(UIView.layoutFittingCompressedSize).width let contentWidth = contentView.systemLayoutSizeFitting(UIView.layoutFittingCompressedSize).width
scrollView.contentSize = CGSize(width: contentWidth, height: scrollView.bounds.height) scrollView.contentSize = CGSize(width: contentWidth, height: scrollView.bounds.height)
//addDebugBorder(color: .blue) addDebugBorder(color: .blue)
} }
} }
@ -338,11 +338,11 @@ public class TabItem: View {
} }
} }
// public override func draw(_ rect: CGRect) { public override func draw(_ rect: CGRect) {
// super.draw(rect) super.draw(rect)
//
// addDebugBorder(color: .green) addDebugBorder(color: .green)
// } }
} }