From b372948135af0ac9cd3eb0c76db8561c17ae36df Mon Sep 17 00:00:00 2001 From: Roy-wonji Date: Mon, 27 Nov 2023 16:31:42 +0900 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8[feat]:=20fastlane=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Setting/Project+Settings.swift | 50 ++++++++---- PingPong/Projects/App/Project.swift | 5 +- .../Projects/Core/Authorization/Project.swift | 5 +- .../Sources/Manger/GoogleLoginManger.swift | 54 ++++++------- .../Application/Extension+UIApplication.swift | 22 ------ .../Application/KeyboardHandler.swift | 37 --------- .../Extenstion/Image/Extension+Image.swift | 39 ---------- .../Extenstion/Image/Extension+UIImage.swift | 43 ----------- .../Extenstion/Size/Extension+UIDevice.swift | 18 ----- .../Extenstion/Size/Extension+UIScreen.swift | 19 ----- .../Extenstion/Size/Extension+View.swift | 32 -------- .../Size/Extenstion+SizeReader.swift | 53 ------------- .../Sources/View/Color/ColorAsset.swift | 47 ----------- .../Sources/View/Font/CustomFont.swift | 69 ----------------- .../Sources/View/Image/ImageAsset.swift | 23 ------ .../Sources/View/List/AgreeMentListView.swift | 77 ------------------- .../View/ScrollView/ScrollViewModifier.swift | 29 ------- .../Sources/View/Size/ScreenLayout.swift | 29 ------- .../Sources/View/Size/ScreenSize.swift | 66 ---------------- 19 files changed, 71 insertions(+), 646 deletions(-) delete mode 100644 PingPong/Projects/DesignSystem/DesignSystemTests/Sources/Extenstion/Application/Extension+UIApplication.swift delete mode 100644 PingPong/Projects/DesignSystem/DesignSystemTests/Sources/Extenstion/Application/KeyboardHandler.swift delete mode 100644 PingPong/Projects/DesignSystem/DesignSystemTests/Sources/Extenstion/Image/Extension+Image.swift delete mode 100644 PingPong/Projects/DesignSystem/DesignSystemTests/Sources/Extenstion/Image/Extension+UIImage.swift delete mode 100644 PingPong/Projects/DesignSystem/DesignSystemTests/Sources/Extenstion/Size/Extension+UIDevice.swift delete mode 100644 PingPong/Projects/DesignSystem/DesignSystemTests/Sources/Extenstion/Size/Extension+UIScreen.swift delete mode 100644 PingPong/Projects/DesignSystem/DesignSystemTests/Sources/Extenstion/Size/Extension+View.swift delete mode 100644 PingPong/Projects/DesignSystem/DesignSystemTests/Sources/Extenstion/Size/Extenstion+SizeReader.swift delete mode 100644 PingPong/Projects/DesignSystem/DesignSystemTests/Sources/View/Color/ColorAsset.swift delete mode 100644 PingPong/Projects/DesignSystem/DesignSystemTests/Sources/View/Font/CustomFont.swift delete mode 100644 PingPong/Projects/DesignSystem/DesignSystemTests/Sources/View/Image/ImageAsset.swift delete mode 100644 PingPong/Projects/DesignSystem/DesignSystemTests/Sources/View/List/AgreeMentListView.swift delete mode 100644 PingPong/Projects/DesignSystem/DesignSystemTests/Sources/View/ScrollView/ScrollViewModifier.swift delete mode 100644 PingPong/Projects/DesignSystem/DesignSystemTests/Sources/View/Size/ScreenLayout.swift delete mode 100644 PingPong/Projects/DesignSystem/DesignSystemTests/Sources/View/Size/ScreenSize.swift diff --git a/PingPong/Plugins/PingPongs/ProjectDescriptionHelpers/Setting/Project+Settings.swift b/PingPong/Plugins/PingPongs/ProjectDescriptionHelpers/Setting/Project+Settings.swift index 29c53301..a6f4b584 100644 --- a/PingPong/Plugins/PingPongs/ProjectDescriptionHelpers/Setting/Project+Settings.swift +++ b/PingPong/Plugins/PingPongs/ProjectDescriptionHelpers/Setting/Project+Settings.swift @@ -51,9 +51,6 @@ extension Settings { "DEVELOPMENT_ASSET_PATHS": "\"Resources/Preview Content\"", "PRODUCT_NAME" :"PingPongs" , "DISPLAY_NAME" : "PingPong" , - "CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER": "NO", - "CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES": "YES", - "OTHER_SWIFT_FLAGS": "-Xcc -Wno-error=non-modular-include-in-framework-module", "OTHER_LDFLAGS": [ "-all_load", ], @@ -73,17 +70,20 @@ extension Settings { .debug(name: .debug, settings: [ "PRODUCT_NAME": "PingPong", "OTHER_LDFLAGS": [ - "-Xlinker", "-interposable","-all_load", "-ObjC"], - "CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER": "NO", - "CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES": "YES", - "OTHER_SWIFT_FLAGS": "-Xcc -Wno-error=non-modular-include-in-framework-module" + "-Xlinker", "-interposable", "-all_load", // Set the strip style to non-global symbols + ], + "STRIP_STYLE": [ + "non-global" + ], ]), .release(name: .release, settings: [ "PRODUCT_NAME": "PingPong", - "OTHER_LDFLAGS": ["-Xlinker", "-interposable", "-all_load", "-ObjC"], - "CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER": "NO", - "CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES": "YES", - "OTHER_SWIFT_FLAGS": "-Xcc -Wno-error=non-modular-include-in-framework-module" + "OTHER_LDFLAGS": [ + "-all_load", + ], + "STRIP_STYLE": [ + "non-global" + ], ])], defaultSettings: .recommended) public static let appWidgetSetting: Settings = .settings( @@ -96,9 +96,31 @@ extension Settings { "DEVELOPMENT_TEAM": "N94CS4N6VR", "DEBUG_INFORMATION_FORMAT": "DWARF with dSYM File", "DEVELOPMENT_ASSET_PATH" : "\"Resources/Preview Content\""] ,configurations: [ - .debug(name: .debug, settings: ["PRODUCT_NAME" : "PingPong","DISPLAY_NAME" : "PingPong", "OTHER_LDFLAGS": ["-Xlinker", "-interposable", "-all_load", "-ObjC"]]), - .debug(name: "Dev", settings: ["PRODUCT_NAME" : "PingPong-Dev","DISPLAY_NAME" : "PingPong", "OTHER_LDFLAGS": ["-Xlinker", "-interposable", "-all_load"]]), - .release(name: .release, settings: ["DEVELOPMENT_ASSET_PATHS": "\"Resources/Preview Content\"","PRODUCT_NAME" :"PingPongs" , "DISPLAY_NAME" : "PingPong" , "OTHER_LDFLAGS": ["-Xlinker", "-interposable", "-all_load", "-ObjC"]])], + .debug(name: .debug, settings: [ + "PRODUCT_NAME" : "PingPong", + "DISPLAY_NAME" : "PingPong", + "OTHER_LDFLAGS": [ + "-Xlinker", "-interposable", "-all_load", "-ObjC" + ] + ]), + .debug(name: "Dev", settings: [ + "PRODUCT_NAME" : "PingPong-Dev", + "DISPLAY_NAME" : "PingPong", + "OTHER_LDFLAGS": [ + "-Xlinker", "-interposable", "-all_load" + ] + ]), + .release(name: .release, settings: [ + "DEVELOPMENT_ASSET_PATHS": "\"Resources/Preview Content\"", + "PRODUCT_NAME" :"PingPongs" , + "DISPLAY_NAME" : "PingPong" , + "OTHER_LDFLAGS": [ + "-all_load", + ], + "STRIP_STYLE": [ + "non-global" + ], + ])], defaultSettings: .recommended)} diff --git a/PingPong/Projects/App/Project.swift b/PingPong/Projects/App/Project.swift index d8845ba9..49887922 100644 --- a/PingPong/Projects/App/Project.swift +++ b/PingPong/Projects/App/Project.swift @@ -18,10 +18,13 @@ let project = Project.makeAppModule( platform: .iOS, product: .app, packages: [ // packages를 추가하여 Amplify 라이브러리 추가 - + ], setting: .appMainSetting, dependencies: [ +// .package(product: "FirebaseMessaging"), +// .package(product: "FirebaseMessaging", type: .plugin), + .SPM.FirebaseMessaging, .feature(implements: .OnBoarding) // .SPM.GoogleSignIn, diff --git a/PingPong/Projects/Core/Authorization/Project.swift b/PingPong/Projects/Core/Authorization/Project.swift index 395a414a..4d2183f5 100644 --- a/PingPong/Projects/Core/Authorization/Project.swift +++ b/PingPong/Projects/Core/Authorization/Project.swift @@ -15,7 +15,6 @@ let project = Project.makeFramsWorkModule( bundleId: .appBundleID(name: ".Authorization"), product: .staticFramework, packages: [ - ], setting: .appBaseSetting, dependencies: [ @@ -25,6 +24,10 @@ let project = Project.makeFramsWorkModule( .SPM.CombineMoya, .SPM.Moya, +// .package(product: "FirebaseAuth"), +// .package(product: "FirebaseFirestore"), +// .package(product: "FirebaseAuth", type: .plugin), +// .package(product: "FirebaseFirestore", type: .macro) .SPM.FirebaseAuth, .SPM.FirebaseFirestore // .SPM.GoogleSignIn, diff --git a/PingPong/Projects/Core/Authorization/Sources/Manger/GoogleLoginManger.swift b/PingPong/Projects/Core/Authorization/Sources/Manger/GoogleLoginManger.swift index 8063849b..48e0220b 100644 --- a/PingPong/Projects/Core/Authorization/Sources/Manger/GoogleLoginManger.swift +++ b/PingPong/Projects/Core/Authorization/Sources/Manger/GoogleLoginManger.swift @@ -7,30 +7,30 @@ // -import SwiftUI -import CryptoKit -import Firebase - - -struct GoogleLoginManger { - static let shared = GoogleLoginManger() - - func getRootViewController()-> UIViewController{ - guard let screen = UIApplication.shared.connectedScenes.first as? UIWindowScene else{ - return .init() - } - guard let root = screen.windows.first?.rootViewController else{ - return .init() - } - return root - } - - func appDeleteSignout() { - do { - try Auth.auth().signOut() - } catch let error { - print("error signing out: \(error.localizedDescription)") - } - } - -} +//import SwiftUI +//import CryptoKit +//import Firebase +// +// +//struct GoogleLoginManger { +// static let shared = GoogleLoginManger() +// +// func getRootViewController()-> UIViewController{ +// guard let screen = UIApplication.shared.connectedScenes.first as? UIWindowScene else{ +// return .init() +// } +// guard let root = screen.windows.first?.rootViewController else{ +// return .init() +// } +// return root +// } +// +// func appDeleteSignout() { +// do { +// try Auth.auth().signOut() +// } catch let error { +// print("error signing out: \(error.localizedDescription)") +// } +// } +// +//} diff --git a/PingPong/Projects/DesignSystem/DesignSystemTests/Sources/Extenstion/Application/Extension+UIApplication.swift b/PingPong/Projects/DesignSystem/DesignSystemTests/Sources/Extenstion/Application/Extension+UIApplication.swift deleted file mode 100644 index adce6e97..00000000 --- a/PingPong/Projects/DesignSystem/DesignSystemTests/Sources/Extenstion/Application/Extension+UIApplication.swift +++ /dev/null @@ -1,22 +0,0 @@ -// -// Extension+UIApplication.swift -// Component -// -// Created by 서원지 on 2023/06/03. -// Copyright © 2023 Wonji Suh. All rights reserved. -// - -import SwiftUI - -public extension UIApplication { - //MARK: - 키보드에서 end 하면 키보드 내리기 - func endEditing() { - sendAction(#selector(UIResponder.resignFirstResponder), to: nil, from: nil, for: nil) - } - - - public static let safeAreaInsets = UIApplication.shared.windows[0].safeAreaInsets - public static let contentsHeight = UIScreen.screenHeight - UIApplication.safeAreaInsets.top - UIApplication.safeAreaInsets.bottom - public static let contentsWidth = UIScreen.screenWidth - UIApplication.safeAreaInsets.left - UIApplication.safeAreaInsets.right -} - diff --git a/PingPong/Projects/DesignSystem/DesignSystemTests/Sources/Extenstion/Application/KeyboardHandler.swift b/PingPong/Projects/DesignSystem/DesignSystemTests/Sources/Extenstion/Application/KeyboardHandler.swift deleted file mode 100644 index 9e4cef83..00000000 --- a/PingPong/Projects/DesignSystem/DesignSystemTests/Sources/Extenstion/Application/KeyboardHandler.swift +++ /dev/null @@ -1,37 +0,0 @@ -// -// KeyboardHandler.swift -// Component -// -// Created by 서원지 on 2023/06/03. -// Copyright © 2023 Wonji Suh. All rights reserved. -// - -import Foundation - -import SwiftUI -import Combine - -final class KeyboardHandler: ObservableObject { - //MARK: - 키보드의 높이 조절 - @Published private(set) var keyboardHeight: CGFloat = 0 { - didSet { - showKeyboard = keyboardHeight > 0 - } - } - - @Published var showKeyboard = false - - private var cancellable: AnyCancellable? - - private let keyboardWillShow = NotificationCenter.default.publisher(for: UIResponder.keyboardWillShowNotification) - .compactMap { ($0.userInfo?[UIResponder.keyboardFrameEndUserInfoKey] as? CGRect)?.height } - - private let keyboardWillHide = NotificationCenter.default.publisher(for: UIResponder.keyboardWillHideNotification) - .map { _ in CGFloat.zero } - - init() { - cancellable = Publishers.Merge(keyboardWillShow, keyboardWillHide).subscribe(on: DispatchQueue.main) - .assign(to: \.self.keyboardHeight, on: self) - } -} - diff --git a/PingPong/Projects/DesignSystem/DesignSystemTests/Sources/Extenstion/Image/Extension+Image.swift b/PingPong/Projects/DesignSystem/DesignSystemTests/Sources/Extenstion/Image/Extension+Image.swift deleted file mode 100644 index 716ac7cc..00000000 --- a/PingPong/Projects/DesignSystem/DesignSystemTests/Sources/Extenstion/Image/Extension+Image.swift +++ /dev/null @@ -1,39 +0,0 @@ -// -// Extension+Image.swift -// Component -// -// Created by 서원지 on 2023/06/03. -// Copyright © 2023 Wonji Suh. All rights reserved. -// - -import UIKit -import SwiftUI - -public extension UIImage { - convenience init?(_ asset: ImageAsset) { - self.init(named: asset.rawValue, in: Bundle.module, with: nil) - } - - convenience init?(assetName: String) { - self.init(named: assetName, in: Bundle.module, with: nil) - } -} - -public extension Image { - init(asset: ImageAsset) { - if let uiImage = UIImage(asset) { - self.init(uiImage: uiImage) - } else { - self = Image(systemName: "questionmark") - } - } - - init(assetName: String) { - if let uiImage = UIImage(assetName: assetName) { - self.init(uiImage: uiImage) - } else { - self = Image(systemName: "questionmark") - } - } -} - diff --git a/PingPong/Projects/DesignSystem/DesignSystemTests/Sources/Extenstion/Image/Extension+UIImage.swift b/PingPong/Projects/DesignSystem/DesignSystemTests/Sources/Extenstion/Image/Extension+UIImage.swift deleted file mode 100644 index 56f7ed7a..00000000 --- a/PingPong/Projects/DesignSystem/DesignSystemTests/Sources/Extenstion/Image/Extension+UIImage.swift +++ /dev/null @@ -1,43 +0,0 @@ -// -// Extension+UIImage.swift -// Component -// -// Created by 서원지 on 2023/06/03. -// Copyright © 2023 Wonji Suh. All rights reserved. -// - -import UIKit - -public extension UIImage { - - func roundedImage() -> UIImage? { - let imageSize = CGSize(width: self.size.width, height: self.size.height) - let radius = min(self.size.width, self.size.height) / 2.0 - let roundedRect = CGRect(origin: .zero, size: imageSize).insetBy(dx: radius, dy: radius) - - let renderer = UIGraphicsImageRenderer(size: imageSize) - let roundedImage = renderer.image { context in - let path = UIBezierPath(roundedRect: CGRect(origin: .zero, size: imageSize), cornerRadius: radius) - context.cgContext.addPath(path.cgPath) - context.cgContext.clip() - self.draw(in: roundedRect) - } - return roundedImage - } - - func setRoundedCorners() -> UIImage? { - let imageView = UIImageView(image: self) - let layer = imageView.layer - layer.masksToBounds = true - layer.cornerRadius = imageView.frame.width / 2.0 - UIGraphicsBeginImageContext(imageView.bounds.size) - defer { UIGraphicsEndImageContext() } - if let context = UIGraphicsGetCurrentContext() { - layer.render(in: context) - let roundedImage = UIGraphicsGetImageFromCurrentImageContext() - return roundedImage - } - return nil - } -} - diff --git a/PingPong/Projects/DesignSystem/DesignSystemTests/Sources/Extenstion/Size/Extension+UIDevice.swift b/PingPong/Projects/DesignSystem/DesignSystemTests/Sources/Extenstion/Size/Extension+UIDevice.swift deleted file mode 100644 index e427bb17..00000000 --- a/PingPong/Projects/DesignSystem/DesignSystemTests/Sources/Extenstion/Size/Extension+UIDevice.swift +++ /dev/null @@ -1,18 +0,0 @@ -// -// Extension+UIDevice.swift -// Component -// -// Created by 서원지 on 2023/06/03. -// Copyright © 2023 Wonji Suh. All rights reserved. -// - -import Foundation -import SwiftUI - -public extension UIDevice { - public static var hasNotch: Bool { - let bottom = UIApplication.shared.windows[0].safeAreaInsets.bottom - return bottom > 0 - } -} - diff --git a/PingPong/Projects/DesignSystem/DesignSystemTests/Sources/Extenstion/Size/Extension+UIScreen.swift b/PingPong/Projects/DesignSystem/DesignSystemTests/Sources/Extenstion/Size/Extension+UIScreen.swift deleted file mode 100644 index f93efdbb..00000000 --- a/PingPong/Projects/DesignSystem/DesignSystemTests/Sources/Extenstion/Size/Extension+UIScreen.swift +++ /dev/null @@ -1,19 +0,0 @@ -// -// Extension+UIScreen.swift -// Component -// -// Created by 서원지 on 2023/06/03. -// Copyright © 2023 Wonji Suh. All rights reserved. -// - -import Foundation -import SwiftUI - -public extension UIScreen { - public static let screenWidth = UIScreen.main.bounds.size.width - public static let screenHeight = UIScreen.main.bounds.size.height - public static let screenSize = UIScreen.main.bounds.size - public static let qrcodeButtonWidth = screenWidth - (screenWidth * 0.1) - -} - diff --git a/PingPong/Projects/DesignSystem/DesignSystemTests/Sources/Extenstion/Size/Extension+View.swift b/PingPong/Projects/DesignSystem/DesignSystemTests/Sources/Extenstion/Size/Extension+View.swift deleted file mode 100644 index 65401a77..00000000 --- a/PingPong/Projects/DesignSystem/DesignSystemTests/Sources/Extenstion/Size/Extension+View.swift +++ /dev/null @@ -1,32 +0,0 @@ -// -// Extension+View.swift -// Component -// -// Created by 서원지 on 2023/06/03. -// Copyright © 2023 Wonji Suh. All rights reserved. -// - -import Foundation -import SwiftUI -import UIKit - -public extension View { - - public func getRect()->CGRect{ - UIScreen.main.bounds - } - - public func getSafeArea() -> UIEdgeInsets { - guard let screen = UIApplication.shared.connectedScenes.first as? UIWindowScene else{ - return .zero - } - - guard let safeArea = screen.windows.first?.safeAreaInsets else{ - return .zero - } - - return safeArea - } -} - - diff --git a/PingPong/Projects/DesignSystem/DesignSystemTests/Sources/Extenstion/Size/Extenstion+SizeReader.swift b/PingPong/Projects/DesignSystem/DesignSystemTests/Sources/Extenstion/Size/Extenstion+SizeReader.swift deleted file mode 100644 index 5b165e12..00000000 --- a/PingPong/Projects/DesignSystem/DesignSystemTests/Sources/Extenstion/Size/Extenstion+SizeReader.swift +++ /dev/null @@ -1,53 +0,0 @@ -// -// Extenstion+SizeReader.swift -// Component -// -// Created by 서원지 on 2023/06/03. -// Copyright © 2023 Wonji Suh. All rights reserved. -// - -import SwiftUI - -public extension View { - public func readSize(onChange: @escaping (CGSize) -> Void) -> some View { - background( - GeometryReader { geometryProxy in - Color.clear - .preference(key: FlexibleSizePreferenceKey.self, value: geometryProxy.size) - } - ) - .onPreferenceChange(FlexibleSizePreferenceKey.self, perform: onChange) - } - - public func readRect(onChange: @escaping (CGRect) -> Void) -> some View { - background( - GeometryReader { geometryProxy in - Color.clear - .preference(key: FlexibleFramePreferenceKey.self, value: geometryProxy.frame(in: .global)) - } - ) - .onPreferenceChange(FlexibleFramePreferenceKey.self, perform: onChange) - } - - public func readRect(name: String, onChange: @escaping (CGRect) -> Void) -> some View { - background( - GeometryReader { geometryProxy in - Color.clear - .preference(key: FlexibleFramePreferenceKey.self, value: geometryProxy.frame(in: .named(name))) - } - ) - .onPreferenceChange(FlexibleFramePreferenceKey.self, perform: onChange) - } -} - -private struct FlexibleSizePreferenceKey: PreferenceKey { - static var defaultValue: CGSize = .zero - static func reduce(value: inout CGSize, nextValue: () -> CGSize) {} -} - -private struct FlexibleFramePreferenceKey: PreferenceKey { - static var defaultValue: CGRect = .zero - static func reduce(value: inout CGRect, nextValue: () -> CGRect) {} -} - - diff --git a/PingPong/Projects/DesignSystem/DesignSystemTests/Sources/View/Color/ColorAsset.swift b/PingPong/Projects/DesignSystem/DesignSystemTests/Sources/View/Color/ColorAsset.swift deleted file mode 100644 index 111d3dfe..00000000 --- a/PingPong/Projects/DesignSystem/DesignSystemTests/Sources/View/Color/ColorAsset.swift +++ /dev/null @@ -1,47 +0,0 @@ -// -// ColorAsset.swift -// Component -// -// Created by 서원지 on 2023/06/03. -// Copyright © 2023 Wonji Suh. All rights reserved. -// - -import Foundation -import SwiftUI - - -public enum Colors: String { - case Mint - case Navy - case Gray - case Gray2 - case Gray3 - case LanchColor -} - - -public extension Color { - static let mints = pingColor(.Mint) - static let navy = pingColor(.Navy) - static let grays = pingColor(.Gray) - static let gray2 = pingColor(.Gray2) - static let gray3 = pingColor(.Gray3) - static let lanch = pingColor(.LanchColor) - -} - - - - -public extension Color { - - static func pingColor(_ color: Colors) -> Color { - guard let uiColor = UIColor(named: color.rawValue, in: Bundle.module, compatibleWith: nil) else { - fatalError("No color named '\(color.rawValue)' found in asset catalog for module \(Bundle.module)") - } - return Color(uiColor) - } -} - - - diff --git a/PingPong/Projects/DesignSystem/DesignSystemTests/Sources/View/Font/CustomFont.swift b/PingPong/Projects/DesignSystem/DesignSystemTests/Sources/View/Font/CustomFont.swift deleted file mode 100644 index c24f13ef..00000000 --- a/PingPong/Projects/DesignSystem/DesignSystemTests/Sources/View/Font/CustomFont.swift +++ /dev/null @@ -1,69 +0,0 @@ -// -// CustomFont.swift -// Component -// -// Created by 서원지 on 2023/06/03. -// Copyright © 2023 Wonji Suh. All rights reserved. -// - -import UIKit -import SwiftUI - -public enum PretendardFontFamily: CustomStringConvertible { - case Black, Bold, ExtraBold, ExtraLight, Light, Medium, Regular, SemiBold, Thin - - public var description: String { - switch self { - case .Black: - return "Black" - case .Bold: - return "Bold" - case .ExtraBold: - return "ExtraBold" - case .ExtraLight: - return "ExtraLight" - case .Light: - return "Light" - case .Medium: - return "Medium" - case .Regular: - return "Regular" - case .SemiBold: - return "SemiBold" - case .Thin: - return "Thin" - } - } -} - - -public struct PretendardFont: ViewModifier { - public var family: PretendardFontFamily - public var size: CGFloat - - public func body(content: Content) -> some View { - return content.font(.custom("Pretendard-\(family)", fixedSize: size)) - } -} - - -public extension View { - public func pretendardFont(family: PretendardFontFamily, size: CGFloat) -> some View { - return self.modifier(PretendardFont(family: family, size: size)) - } -} - -public extension UIFont { - public static func pretendardFontFamily(family: PretendardFontFamily, size: CGFloat) -> Font{ - let font = Font.custom("Pretendard-\(family)", size: size) - return font - } -} - -public extension Font { - public static func pretendardFontFamily(family: PretendardFontFamily, size: CGFloat) -> Font{ - let font = Font.custom("Pretendard-\(family)", size: size) - return font - } -} - diff --git a/PingPong/Projects/DesignSystem/DesignSystemTests/Sources/View/Image/ImageAsset.swift b/PingPong/Projects/DesignSystem/DesignSystemTests/Sources/View/Image/ImageAsset.swift deleted file mode 100644 index 293d4adf..00000000 --- a/PingPong/Projects/DesignSystem/DesignSystemTests/Sources/View/Image/ImageAsset.swift +++ /dev/null @@ -1,23 +0,0 @@ -// -// ImageAsset.swift -// Component -// -// Created by 서원지 on 2023/06/03. -// Copyright © 2023 Wonji Suh. All rights reserved. -// - -import Foundation - -public enum ImageAsset: String { - - //MARK: - 홈 화면 아이콘 - - - //MARK: - 탭바 아이콘 - - - - case empty -} - - diff --git a/PingPong/Projects/DesignSystem/DesignSystemTests/Sources/View/List/AgreeMentListView.swift b/PingPong/Projects/DesignSystem/DesignSystemTests/Sources/View/List/AgreeMentListView.swift deleted file mode 100644 index 004ffb18..00000000 --- a/PingPong/Projects/DesignSystem/DesignSystemTests/Sources/View/List/AgreeMentListView.swift +++ /dev/null @@ -1,77 +0,0 @@ -// -// AgreeMentListView.swift -// DesignSystem -// -// Created by 서원지 on 2023/06/25. -// Copyright © 2023 Wonji Suh. All rights reserved. -// - -import SwiftUI - -public struct AgreeMentListView: View { - - @Binding var checkAgreeButton: Bool - - var showleft: Bool - var title: String - var showBold: Bool - - public init(checkAgreeButton: Binding, showleft: Bool, title: String, showBold: Bool) { - self._checkAgreeButton = checkAgreeButton - self.showleft = showleft - self.title = title - self.showBold = showBold - } - - - public var body: some View { - VStack{ - HStack { - Image(systemName: checkAgreeButton ? "checkmark.circle.fill" : "checkmark.circle") - .resizable() - .scaledToFit() - .frame(width: 20, height: 20) - .foregroundColor(checkAgreeButton ? .green : .gray) - .onTapGesture { - checkAgreeButton.toggle() - } - - if showBold == true { - Text(title) - .font(.system(size: 16)) - .bold() - } else { - Text(title) - .font(.system(size: 16)) - .foregroundColor(.gray) - } - - - Spacer() - - if !showleft { - Image(systemName: "chevron.right") - .resizable() - .scaledToFit() - .frame(width: 15, height: 15) - .foregroundColor(.gray) - - } else { - Spacer() - - } - - } - Spacer() - .frame(height: 20) - } - .padding(.vertical, 5) - .padding(.horizontal, 20) - } -} - -struct AgreeMentListView_Previews: PreviewProvider { - static var previews: some View { - AgreeMentListView(checkAgreeButton: .constant(true), showleft: false, title: "", showBold: true) - } -} diff --git a/PingPong/Projects/DesignSystem/DesignSystemTests/Sources/View/ScrollView/ScrollViewModifier.swift b/PingPong/Projects/DesignSystem/DesignSystemTests/Sources/View/ScrollView/ScrollViewModifier.swift deleted file mode 100644 index 07985456..00000000 --- a/PingPong/Projects/DesignSystem/DesignSystemTests/Sources/View/ScrollView/ScrollViewModifier.swift +++ /dev/null @@ -1,29 +0,0 @@ -// -// ScrollViewModifier.swift -// DesignSystem -// -// Created by 서원지 on 2023/06/25. -// Copyright © 2023 Wonji Suh. All rights reserved. -// - -import SwiftUI - -public struct ScrollViewModifier: ViewModifier { - public init( isBounce: Bool) { - UIScrollView.appearance().bounces = isBounce - } - - public func body(content: Content) -> some View { - content - } - - -} - -extension ScrollView { - - public func bounce(_ isBounce: Bool) -> some View { - self.modifier(ScrollViewModifier(isBounce: isBounce)) - } -} - diff --git a/PingPong/Projects/DesignSystem/DesignSystemTests/Sources/View/Size/ScreenLayout.swift b/PingPong/Projects/DesignSystem/DesignSystemTests/Sources/View/Size/ScreenLayout.swift deleted file mode 100644 index 180dc00b..00000000 --- a/PingPong/Projects/DesignSystem/DesignSystemTests/Sources/View/Size/ScreenLayout.swift +++ /dev/null @@ -1,29 +0,0 @@ -// -// ScreenLayout.swift -// Component -// -// Created by 서원지 on 2023/06/03. -// Copyright © 2023 Wonji Suh. All rights reserved. -// - -import UIKit -import SwiftUI - -public enum ScreenLayout { - public static let LayoutMargin: CGFloat = 20 - public static let LayoutMarginAll: CGFloat = 40 - public static let ContentsWidth: CGFloat = (UIScreen.screenWidth - LayoutMarginAll) - - public static let modalTopTransparentSize: CGFloat = 64.0 - - public static let TopLeftRightRadius = 20.0 - public static let TopLeftRightRadius30 = 30.0 - - public static let BottomSheetTopBarViewHeight: CGFloat = 80 - public static let BottomButtonHeight: CGFloat = 55 - public static let BottomSafeAreaInset = UIDevice.hasNotch ? UIApplication.safeAreaInsets.bottom : 30 - - public static let TitleBarHeight: CGFloat = 44 - -} - diff --git a/PingPong/Projects/DesignSystem/DesignSystemTests/Sources/View/Size/ScreenSize.swift b/PingPong/Projects/DesignSystem/DesignSystemTests/Sources/View/Size/ScreenSize.swift deleted file mode 100644 index 2e855557..00000000 --- a/PingPong/Projects/DesignSystem/DesignSystemTests/Sources/View/Size/ScreenSize.swift +++ /dev/null @@ -1,66 +0,0 @@ -// -// ScreenSize.swift -// Component -// -// Created by 서원지 on 2023/06/03. -// Copyright © 2023 Wonji Suh. All rights reserved. -// - -import Foundation -import UIKit -import SwiftUI - -public class ScreenSize { - public static let shared = ScreenSize() - - public let bounds = UIScreen.main.bounds - - public let tabItemWidth: CGFloat = UIScreen.main.bounds.width / 4 - - public var tabBarHeight: CGFloat { - UIApplication.shared.windows.filter { $0.isKeyWindow }.first?.safeAreaInsets.bottom == 0 ? 49 : 84 - } - - public var tabBarFrameHeight : CGFloat { - UIApplication.shared.windows.filter { $0.isKeyWindow }.first?.safeAreaInsets.bottom == 0 ? -20 : 20 - } - - public var tabBarOffset: CGFloat { - if UIDevice.hasNotch == true { - let bottomSafeAreaInset = UIApplication.shared.windows.filter { $0.isKeyWindow }.first?.safeAreaInsets.bottom ?? 0 - let tabBarHeight: CGFloat = bottomSafeAreaInset > 0 ? 5 : 5 - return UIScreen.screenHeight / 40 - tabBarHeight - } else { - return UIScreen.screenHeight / 40 - 15 - } - } - - - - public var chargingHeight: Int { - if UIDevice.hasNotch { - return Int(UIScreen.screenHeight/3 + 20) - } else { - return Int(UIScreen.screenHeight/3 + 10) - } - } - - - public var widthtmp: Int { - return Int(UIScreen.main.bounds.width - (bounds.width * 0.1)) - } - - public var heighttmp: Int { - return Int(bounds.height / 4) - 50 - } - - public var pY: Int { - return Int(bounds.height / 3) + 50 - } - - public var pX: Int { - return Int((Int(bounds.width)/2) - (widthtmp/2)) - } -} - -