Skip to content

Commit c9fc632

Browse files
committed
refactor
1 parent e5df3b1 commit c9fc632

14 files changed

Lines changed: 44 additions & 8 deletions

FXViewKit.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
Pod::Spec.new do |spec|
1010
spec.name = "FXViewKit"
11-
spec.version = "0.2.3"
11+
spec.version = "0.3.0"
1212
spec.summary = "A View Framework"
1313
spec.homepage = "https://github.com/feixue299/FXViewKit"
1414
spec.license = { :type => "MIT", :file => "LICENSE" }

FXViewKit.xcodeproj/project.pbxproj

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77
objects = {
88

99
/* Begin PBXBuildFile section */
10+
048A1DC02705642D00B23393 /* GradientColor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 048A1DBD2705642C00B23393 /* GradientColor.swift */; };
11+
048A1DC12705642D00B23393 /* AppLayout.swift in Sources */ = {isa = PBXBuildFile; fileRef = 048A1DBE2705642D00B23393 /* AppLayout.swift */; };
12+
048A1DC22705642D00B23393 /* AppTheme.swift in Sources */ = {isa = PBXBuildFile; fileRef = 048A1DBF2705642D00B23393 /* AppTheme.swift */; };
1013
1F6FDA5923FC8663008D5647 /* CustomIntrinsicContentSizeView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1F6FDA5823FC8663008D5647 /* CustomIntrinsicContentSizeView.swift */; };
1114
1F8599EC2404736E00C65341 /* BottomLineView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1F8599EB2404736E00C65341 /* BottomLineView.swift */; };
1215
1F8599EE2404753400C65341 /* ShadowView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1F8599ED2404753400C65341 /* ShadowView.swift */; };
@@ -34,6 +37,9 @@
3437
/* End PBXContainerItemProxy section */
3538

3639
/* Begin PBXFileReference section */
40+
048A1DBD2705642C00B23393 /* GradientColor.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GradientColor.swift; sourceTree = "<group>"; };
41+
048A1DBE2705642D00B23393 /* AppLayout.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppLayout.swift; sourceTree = "<group>"; };
42+
048A1DBF2705642D00B23393 /* AppTheme.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppTheme.swift; sourceTree = "<group>"; };
3743
1F6FDA5823FC8663008D5647 /* CustomIntrinsicContentSizeView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CustomIntrinsicContentSizeView.swift; sourceTree = "<group>"; };
3844
1F8599EB2404736E00C65341 /* BottomLineView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BottomLineView.swift; sourceTree = "<group>"; };
3945
1F8599ED2404753400C65341 /* ShadowView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ShadowView.swift; sourceTree = "<group>"; };
@@ -88,6 +94,9 @@
8894
1F8599F024047FB500C65341 /* Tools */ = {
8995
isa = PBXGroup;
9096
children = (
97+
048A1DBE2705642D00B23393 /* AppLayout.swift */,
98+
048A1DBF2705642D00B23393 /* AppTheme.swift */,
99+
048A1DBD2705642C00B23393 /* GradientColor.swift */,
91100
1F8599F12404810800C65341 /* TextFieldBinder.swift */,
92101
);
93102
path = Tools;
@@ -266,12 +275,15 @@
266275
buildActionMask = 2147483647;
267276
files = (
268277
1F8599EE2404753400C65341 /* ShadowView.swift in Sources */,
278+
048A1DC12705642D00B23393 /* AppLayout.swift in Sources */,
269279
1FE3169423FB1F25006D269C /* LeftRightView.swift in Sources */,
270280
1FE316D123FB3C26006D269C /* TopBottomView.swift in Sources */,
281+
048A1DC02705642D00B23393 /* GradientColor.swift in Sources */,
271282
1F6FDA5923FC8663008D5647 /* CustomIntrinsicContentSizeView.swift in Sources */,
272283
1F8599EC2404736E00C65341 /* BottomLineView.swift in Sources */,
273284
1F962C9923FBFDC6005F72D3 /* ContentView.swift in Sources */,
274285
1F8599F22404810800C65341 /* TextFieldBinder.swift in Sources */,
286+
048A1DC22705642D00B23393 /* AppTheme.swift in Sources */,
275287
);
276288
runOnlyForDeploymentPostprocessing = 0;
277289
};

Sources/Tools/AppLayout.swift

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,13 @@
66
//
77

88
import Foundation
9+
#if !os(macOS)
10+
import UIKit
911

1012
public struct AppLayout {
11-
public static let backgroundSpacing: CGFloat = 20
12-
public static let contentSpacing: CGFloat = 15
13-
public static let elementSpacing: CGFloat = 5
14-
public static let viewCornerRadius: CGFloat = 6
13+
public static var backgroundSpacing: CGFloat = 20
14+
public static var contentSpacing: CGFloat = 15
15+
public static var elementSpacing: CGFloat = 5
16+
public static var viewCornerRadius: CGFloat = 6
1517
}
18+
#endif

Sources/Tools/AppTheme.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
//
77

88
import Foundation
9+
#if !os(macOS)
10+
import UIKit
911

1012
public struct AppTheme {
1113
public let activity: UIColor
@@ -44,3 +46,4 @@ public struct AppTheme {
4446
public static var label: UIColor { return currentTheme.label}
4547
public static var label1: UIColor { return currentTheme.label1}
4648
}
49+
#endif

Sources/Tools/GradientColor.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
//
77

88
import Foundation
9+
#if !os(macOS)
10+
import UIKit
911

1012
public protocol GradientColorProtocol {
1113
var colors: [UIColor] { get }
@@ -170,3 +172,4 @@ extension UIColor {
170172
self.init(red: CGFloat(red) / 255.0, green: CGFloat(green) / 255.0, blue: CGFloat(blue) / 255.0, alpha: trans)
171173
}
172174
}
175+
#endif

Sources/Tools/TextFieldBinder.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
// Copyright © 2020 Mr.wu. All rights reserved.
77
//
88

9+
#if !os(macOS)
910
import UIKit
1011

1112
public class TextFieldBinder: NSObject, UITextFieldDelegate {
@@ -30,3 +31,4 @@ public class TextFieldBinder: NSObject, UITextFieldDelegate {
3031
}
3132

3233
}
34+
#endif

Sources/Views/BottomLineView.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
// Copyright © 2020 Mr.wu. All rights reserved.
77
//
88

9+
#if !os(macOS)
910
import UIKit
1011

1112
public class BottomLineView<View: UIView>: UIView {
@@ -43,3 +44,4 @@ public class BottomLineView<View: UIView>: UIView {
4344
}
4445

4546
}
47+
#endif

Sources/Views/CapsuleView.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
//
55
// Created by mac on 2021/7/1.
66
//
7-
7+
#if !os(macOS)
88
import UIKit
99

1010
open class CapsuleView: UIView {
@@ -13,3 +13,4 @@ open class CapsuleView: UIView {
1313
layer.cornerRadius = frame.height / 2
1414
}
1515
}
16+
#endif

Sources/Views/ContentView.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
// Copyright © 2020 Mr.wu. All rights reserved.
77
//
88

9+
#if !os(macOS)
910
import UIKit
1011

1112
public class ContentView<View: UIView>: UIView {
@@ -42,3 +43,4 @@ public class ContentView<View: UIView>: UIView {
4243
}
4344

4445
}
46+
#endif

Sources/Views/CustomIntrinsicContentSizeView.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
// Copyright © 2020 Mr.wu. All rights reserved.
77
//
88

9+
#if !os(macOS)
910
import UIKit
1011

1112
open class CustomIntrinsicContentSizeView: UIView {
@@ -15,3 +16,4 @@ open class CustomIntrinsicContentSizeView: UIView {
1516
}
1617

1718
}
19+
#endif

0 commit comments

Comments
 (0)