Skip to content

Commit 71b830e

Browse files
committed
update
1 parent 976b9b1 commit 71b830e

4 files changed

Lines changed: 56 additions & 2 deletions

File tree

FXViewKit.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Pod::Spec.new do |spec|
1515
spec.author = { "wupengfei" => "[email protected]" }
1616
spec.source = { :git => "https://github.com/feixue299/FXViewKit.git", :tag => "#{spec.version}" }
1717
spec.default_subspec = "Core"
18-
spec.ios.deployment_target = '9.0'
18+
spec.ios.deployment_target = '13.0'
1919
spec.swift_versions = '5.0'
2020

2121
spec.subspec 'Core' do |ss|

Package.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import PackageDescription
66
let package = Package(
77
name: "FXViewKit",
88
platforms: [
9-
.iOS(.v9)
9+
.iOS(.v13)
1010
],
1111
products: [
1212
.library(
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
//
2+
// FXHStack.swift
3+
//
4+
//
5+
// Created by aria on 2023/6/21.
6+
//
7+
8+
import SwiftUI
9+
10+
public struct FXHStack<Content>: View where Content : View {
11+
12+
let alignment: VerticalAlignment
13+
let spacing: CGFloat?
14+
let content: Content
15+
16+
public init(alignment: VerticalAlignment = .center, spacing: CGFloat? = 0, @ViewBuilder content: () -> Content) {
17+
self.alignment = alignment
18+
self.spacing = spacing
19+
self.content = content()
20+
}
21+
22+
public var body: some View {
23+
HStack(alignment: self.alignment, spacing: self.spacing) {
24+
content
25+
}
26+
}
27+
}
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
//
2+
// FXVStack.swift
3+
//
4+
//
5+
// Created by aria on 2023/6/21.
6+
//
7+
8+
import SwiftUI
9+
10+
public struct FXVStack<Content>: View where Content : View {
11+
12+
let alignment: HorizontalAlignment
13+
let spacing: CGFloat?
14+
let content: Content
15+
16+
public init(alignment: HorizontalAlignment = .center, spacing: CGFloat? = 0, @ViewBuilder content: () -> Content) {
17+
self.alignment = alignment
18+
self.spacing = spacing
19+
self.content = content()
20+
}
21+
22+
public var body: some View {
23+
VStack(alignment: self.alignment, spacing: self.spacing) {
24+
content
25+
}
26+
}
27+
}

0 commit comments

Comments
 (0)