Skip to content

Commit 17f0688

Browse files
committed
UPDATE: TabView Stack Logic
1 parent 7449d33 commit 17f0688

File tree

6 files changed

+7
-13
lines changed

6 files changed

+7
-13
lines changed

Sources/OpenTDS/Component/Button/Toolbar/ToolbarButton.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ public struct TossToolbarButton: View {
1111
- image: Image of the Button.
1212
- action: Action when the Button pressed.
1313
*/
14-
public init(_ image: Image, action: @escaping () -> ()) {
14+
public init(_ image: Image, action: @escaping () -> Void) {
1515
self.image = image
1616
self.action = action
1717
}

Sources/OpenTDS/Component/ScrollView/ScrollView+Ext.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ extension TossScrollView {
77
self.backButton()
88
}
99

10-
public func backButton(action: (() -> ())? = nil) -> TossScrollView {
10+
public func backButton(action: (() -> Void)? = nil) -> TossScrollView {
1111
TossScrollView(self.title,
1212
showsIndicators: self.showsIndicators,
1313
backButtonExists: true,

Sources/OpenTDS/Component/ScrollView/ScrollView+Item.swift

Lines changed: 0 additions & 6 deletions
This file was deleted.

Sources/OpenTDS/Component/ScrollView/ScrollView.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public struct TossScrollView<C: View>: View {
1616
let title: String
1717
let showsIndicators: Bool
1818
let backButtonExists: Bool
19-
let backButtonAction: (() -> ())?
19+
let backButtonAction: (() -> Void)?
2020
let toolbarButton: [TossToolbarButton]?
2121
let content: () -> C
2222

@@ -28,7 +28,7 @@ public struct TossScrollView<C: View>: View {
2828
public init(_ title: String,
2929
showsIndicators: Bool = true,
3030
backButtonExists: Bool = false,
31-
backButtonAction: (() -> ())? = nil,
31+
backButtonAction: (() -> Void)? = nil,
3232
toolbarButton: [TossToolbarButton]? = nil,
3333
@ViewBuilder content: @escaping () -> C) {
3434
self.title = title

Sources/OpenTDS/Component/TabView/TabView+Button.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public struct TossTabViewButton: View {
1818

1919
let label: String
2020
let image: Image
21-
let action: () -> ()
21+
let action: () -> Void
2222
var selected: Bool
2323
let haptic: UIImpactFeedbackGenerator.FeedbackStyle?
2424

@@ -33,7 +33,7 @@ public struct TossTabViewButton: View {
3333
_ image: Image,
3434
_ selected: Bool,
3535
haptic: UIImpactFeedbackGenerator.FeedbackStyle? = .light,
36-
action: @escaping () -> ())
36+
action: @escaping () -> Void)
3737
{
3838
self.label = label
3939
self.image = image

Sources/OpenTDS/Component/TabView/TabView.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public struct TossTabView: View {
2727

2828
public var body: some View {
2929
GeometryReader { geometry in
30-
ZStack(alignment: .bottom) {
30+
VStack(spacing: 0) {
3131
ZStack {
3232
ForEach(content.indices, id: \.self) { idx in
3333
content[idx].content

0 commit comments

Comments
 (0)