Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dtzer0/UI/main #20

Open
wants to merge 12 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 16 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added .DS_Store
Binary file not shown.
Binary file added MarketApp/.DS_Store
Binary file not shown.
16 changes: 8 additions & 8 deletions MarketApp/MarketApp.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@
7F93C34C29854D2100345AEC /* AppManger.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7F93C34B29854D2100345AEC /* AppManger.swift */; };
7F93C34F29856C3A00345AEC /* AffinityAppCheck.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7F93C34E29856C3A00345AEC /* AffinityAppCheck.swift */; };
7FA4BF44299A3EE800D8F2F7 /* MainShoesService.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7FA4BF43299A3EE800D8F2F7 /* MainShoesService.swift */; };
7FA4BF46299A3F2A00D8F2F7 /* AffinityAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7FA4BF45299A3F2A00D8F2F7 /* AffinityAPI.swift */; };
7FF4DA192995192200AC04D7 /* SearchView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7FF4DA182995192200AC04D7 /* SearchView.swift */; };
C9A7B73D294353290051E644 /* mockData.json in Resources */ = {isa = PBXBuildFile; fileRef = C9A7B73C294353290051E644 /* mockData.json */; };
EC451F6E290BBCD7008C88A7 /* InfoView.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC451F6D290BBCD7008C88A7 /* InfoView.swift */; };
Expand All @@ -108,6 +107,7 @@
EC892ABB290820B800D02F99 /* FavoriteView.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC892ABA290820B800D02F99 /* FavoriteView.swift */; };
EC892ABD290820C600D02F99 /* ProfileView.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC892ABC290820C600D02F99 /* ProfileView.swift */; };
EC892ABF2908214900D02F99 /* ProductView.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC892ABE2908214900D02F99 /* ProductView.swift */; };
EC92575C29B03D0700F13132 /* CommunityView.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC92575B29B03D0700F13132 /* CommunityView.swift */; };
ECB2F1362909258B00E9F7D3 /* PopView.swift in Sources */ = {isa = PBXBuildFile; fileRef = ECB2F1352909258B00E9F7D3 /* PopView.swift */; };
ECF5BE462914D01E0052655B /* ReviewView.swift in Sources */ = {isa = PBXBuildFile; fileRef = ECF5BE452914D01E0052655B /* ReviewView.swift */; };
/* End PBXBuildFile section */
Expand Down Expand Up @@ -182,7 +182,6 @@
7F93C34B29854D2100345AEC /* AppManger.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppManger.swift; sourceTree = "<group>"; };
7F93C34E29856C3A00345AEC /* AffinityAppCheck.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AffinityAppCheck.swift; sourceTree = "<group>"; };
7FA4BF43299A3EE800D8F2F7 /* MainShoesService.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainShoesService.swift; sourceTree = "<group>"; };
7FA4BF45299A3F2A00D8F2F7 /* AffinityAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AffinityAPI.swift; sourceTree = "<group>"; };
7FF4DA182995192200AC04D7 /* SearchView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SearchView.swift; sourceTree = "<group>"; };
A025DDF51E9A1BBEC7469CCC /* Pods-MarketApp.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-MarketApp.debug.xcconfig"; path = "Target Support Files/Pods-MarketApp/Pods-MarketApp.debug.xcconfig"; sourceTree = "<group>"; };
A507C7A643A5809384D0CF5F /* Pods_MarketApp.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_MarketApp.framework; sourceTree = BUILT_PRODUCTS_DIR; };
Expand All @@ -201,6 +200,7 @@
EC892ABA290820B800D02F99 /* FavoriteView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FavoriteView.swift; sourceTree = "<group>"; };
EC892ABC290820C600D02F99 /* ProfileView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProfileView.swift; sourceTree = "<group>"; };
EC892ABE2908214900D02F99 /* ProductView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProductView.swift; sourceTree = "<group>"; };
EC92575B29B03D0700F13132 /* CommunityView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CommunityView.swift; sourceTree = "<group>"; };
ECB2F1352909258B00E9F7D3 /* PopView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PopView.swift; sourceTree = "<group>"; };
ECF5BE452914D01E0052655B /* ReviewView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReviewView.swift; sourceTree = "<group>"; };
/* End PBXFileReference section */
Expand Down Expand Up @@ -494,7 +494,6 @@
7FA4BF42299A3E4500D8F2F7 /* Main */,
7F39FA80295090080041BF8B /* MarketAPI */,
7F39FA7D29508F840041BF8B /* APIError */,
7FA4BF45299A3F2A00D8F2F7 /* AffinityAPI.swift */,
);
path = Network;
sourceTree = "<group>";
Expand Down Expand Up @@ -666,6 +665,7 @@
EC892ABE2908214900D02F99 /* ProductView.swift */,
ECB2F1352909258B00E9F7D3 /* PopView.swift */,
EC451F6D290BBCD7008C88A7 /* InfoView.swift */,
EC92575B29B03D0700F13132 /* CommunityView.swift */,
ECF5BE452914D01E0052655B /* ReviewView.swift */,
);
path = ProductDetail;
Expand Down Expand Up @@ -945,10 +945,10 @@
7F39FA85295090F50041BF8B /* CheckRegister.swift in Sources */,
7F0565E0298AA0BC0066BE4A /* Demo.swift in Sources */,
7F2815F62990DA1E00B2C481 /* ProfileSettingType.swift in Sources */,
7FA4BF46299A3F2A00D8F2F7 /* AffinityAPI.swift in Sources */,
7F0F165B296C4CBF00FB4C30 /* SignUPView.swift in Sources */,
7F4B9629298D17C3006AAF48 /* View+ReceiveTimer.swift in Sources */,
EC892ABB290820B800D02F99 /* FavoriteView.swift in Sources */,
EC92575C29B03D0700F13132 /* CommunityView.swift in Sources */,
7F0F1655296C456E00FB4C30 /* LoginItem.swift in Sources */,
7F4B9623298D16E9006AAF48 /* ACarouselAutoScroll.swift in Sources */,
7F0F1653296C3AFD00FB4C30 /* SignUPViewModel.swift in Sources */,
Expand Down Expand Up @@ -1068,7 +1068,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
IPHONEOS_DEPLOYMENT_TARGET = 16.0;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
ONLY_ACTIVE_ARCH = YES;
Expand Down Expand Up @@ -1124,7 +1124,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
IPHONEOS_DEPLOYMENT_TARGET = 16.0;
MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES;
SDKROOT = iphoneos;
Expand All @@ -1145,7 +1145,7 @@
CURRENT_PROJECT_VERSION = 3;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEVELOPMENT_ASSET_PATHS = "\"MarketApp/Preview Content\"";
DEVELOPMENT_TEAM = N94CS4N6VR;
DEVELOPMENT_TEAM = "";
ENABLE_PREVIEWS = YES;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = MarketApp/Info.plist;
Expand Down Expand Up @@ -1187,7 +1187,7 @@
CURRENT_PROJECT_VERSION = 3;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEVELOPMENT_ASSET_PATHS = "\"MarketApp/Preview Content\"";
DEVELOPMENT_TEAM = N94CS4N6VR;
DEVELOPMENT_TEAM = "";
ENABLE_PREVIEWS = YES;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = MarketApp/Info.plist;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,140 @@
{
"pins" : [
{
"identity" : "abseil-cpp-swiftpm",
"kind" : "remoteSourceControl",
"location" : "https://github.com/firebase/abseil-cpp-SwiftPM.git",
"state" : {
"revision" : "583de9bd60f66b40e78d08599cc92036c2e7e4e1",
"version" : "0.20220203.2"
}
},
{
"identity" : "appauth-ios",
"kind" : "remoteSourceControl",
"location" : "https://github.com/openid/AppAuth-iOS.git",
"state" : {
"revision" : "3d36a58a2b736f7bc499453e996a704929b25080",
"version" : "1.6.0"
}
},
{
"identity" : "boringssl-swiftpm",
"kind" : "remoteSourceControl",
"location" : "https://github.com/firebase/boringssl-SwiftPM.git",
"state" : {
"revision" : "dd3eda2b05a3f459fc3073695ad1b28659066eab",
"version" : "0.9.1"
}
},
{
"identity" : "firebase-ios-sdk",
"kind" : "remoteSourceControl",
"location" : "https://github.com/firebase/firebase-ios-sdk.git",
"state" : {
"revision" : "7e80c25b51c2ffa238879b07fbfc5baa54bb3050",
"version" : "9.6.0"
}
},
{
"identity" : "googleappmeasurement",
"kind" : "remoteSourceControl",
"location" : "https://github.com/google/GoogleAppMeasurement.git",
"state" : {
"revision" : "c1cfde8067668027b23a42c29d11c246152fe046",
"version" : "9.6.0"
}
},
{
"identity" : "googledatatransport",
"kind" : "remoteSourceControl",
"location" : "https://github.com/google/GoogleDataTransport.git",
"state" : {
"revision" : "f6b558e3f801f2cac336b04f615ce111fa9ddaa0",
"version" : "9.2.1"
}
},
{
"identity" : "googlesignin-ios",
"kind" : "remoteSourceControl",
"location" : "https://github.com/google/GoogleSignIn-iOS",
"state" : {
"revision" : "9c9b36af86a4dd3da16048a36cf37351e63ccfe1",
"version" : "6.2.4"
}
},
{
"identity" : "googleutilities",
"kind" : "remoteSourceControl",
"location" : "https://github.com/google/GoogleUtilities.git",
"state" : {
"revision" : "0543562f85620b5b7c510c6bcbef75b562a5127b",
"version" : "7.11.0"
}
},
{
"identity" : "grpc-ios",
"kind" : "remoteSourceControl",
"location" : "https://github.com/grpc/grpc-ios.git",
"state" : {
"revision" : "8440b914756e0d26d4f4d054a1c1581daedfc5b6",
"version" : "1.44.3-grpc"
}
},
{
"identity" : "gtm-session-fetcher",
"kind" : "remoteSourceControl",
"location" : "https://github.com/google/gtm-session-fetcher.git",
"state" : {
"revision" : "5ccda3981422a84186387dbb763ba739178b529c",
"version" : "2.3.0"
}
},
{
"identity" : "gtmappauth",
"kind" : "remoteSourceControl",
"location" : "https://github.com/google/GTMAppAuth.git",
"state" : {
"revision" : "6dee0cde8a1b223737a5159e55e6b4ec16bbbdd9",
"version" : "1.3.1"
}
},
{
"identity" : "leveldb",
"kind" : "remoteSourceControl",
"location" : "https://github.com/firebase/leveldb.git",
"state" : {
"revision" : "0706abcc6b0bd9cedfbb015ba840e4a780b5159b",
"version" : "1.22.2"
}
},
{
"identity" : "nanopb",
"kind" : "remoteSourceControl",
"location" : "https://github.com/firebase/nanopb.git",
"state" : {
"revision" : "819d0a2173aff699fb8c364b6fb906f7cdb1a692",
"version" : "2.30909.0"
}
},
{
"identity" : "promises",
"kind" : "remoteSourceControl",
"location" : "https://github.com/google/promises.git",
"state" : {
"revision" : "ec957ccddbcc710ccc64c9dcbd4c7006fcf8b73a",
"version" : "2.2.0"
}
},
{
"identity" : "swift-protobuf",
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-protobuf.git",
"state" : {
"revision" : "ab3a58b7209a17d781c0d1dbb3e1ff3da306bae8",
"version" : "1.20.3"
}
}
],
"version" : 2
}
137 changes: 137 additions & 0 deletions MarketApp/MarketApp/Component/CartView.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,137 @@
//
// CartView.swift
// MarketApp
//
// Created by 홍태희 on 2022/10/25.
//

import SwiftUI

struct CartView: View {

@State private var deleted = false

var body: some View {
VStack {
ScrollView(.vertical, showsIndicators: true) {
ForEach(0..<5) { _ in
CartList()
.padding()
}
}
PriceStack()
.frame(width: UIScreen.main.bounds.width, height: UIScreen.main.bounds.height/4, alignment: .center)
.padding()
}
}

@ViewBuilder
private func CartList() -> some View {
ZStack {
Rectangle()
.fill(.white)
.frame(width: UIScreen.main.bounds.width - 30, height: UIScreen.main.bounds.height/2.5)
.overlay(
RoundedRectangle(cornerRadius: 20)
.stroke(Color.black, lineWidth: 1)
)

VStack {
HStack {
Image("shoes")
.resizable()
.frame(width: 120, height: 120)
.padding(.trailing, 10)

VStack {
VStack {
Text("Maison Kitsune")
.font(.system(size: 15, weight: .bold, design: .monospaced))
.frame(width: 180, height: 20, alignment: .leading)
Text("더블 폭스 패치 스니커즈")
.font(.system(size: 18, weight: .medium, design: .default))
.frame(width: 180, height: 20, alignment: .leading)
Text("281,000원")
.font(.system(size: 15, weight: .bold, design: .monospaced))
.frame(width: 180, height: 20, alignment: .leading)
}
}
}

Rectangle()
.fill(.white)
.frame(width: 300, height: 50, alignment: .center)
.overlay(
Rectangle()
.stroke(Color.gray, lineWidth: 1)
)
.padding()

HStack {
Button(action: {

}, label: {
Text("옵션변경")
.font(.system(size: 17, weight: .medium))
.frame(width: 150, height: 50)
.foregroundColor(.black)
.overlay(
RoundedRectangle(cornerRadius: 0)
.stroke(.black, lineWidth: 1)
)
})

Button(action: {
self.deleted.toggle()
}, label: {
Text("삭제")
.font(.system(size: 17, weight: .medium))
.frame(width: 150, height: 50)
.foregroundColor(.white)
.background(.black)
})
.alert(Text("삭제"), isPresented: $deleted, actions: {
Button("확인", role: .destructive) {}
Button("취소", role: .cancel) {}
}, message: {
Text("정말 삭제하시겠어요?")
})
}
}
}
}

@ViewBuilder
private func PriceStack() -> some View {
let testValue = 230000
let saleValue = 100000

VStack {
Text("기존 금액 : \(testValue)원")
.foregroundColor(.gray)
.frame(width: UIScreen.main.bounds.width, height: 30, alignment: .center)
Text("할인 금액 : \(saleValue)원")
.foregroundColor(.gray)
.frame(width: UIScreen.main.bounds.width, height: 30, alignment: .center)
Text("최종 결제 금액 : \(testValue - saleValue)원")
.font(.system(size: 18, weight: .bold))
.frame(width: UIScreen.main.bounds.width, height: 30, alignment: .center)

Button(action: {

}, label: {
Text("구매하기")
.font(.system(size: 17, weight: .medium))
.frame(width: 350, height: 50)
.foregroundColor(.white)
.background(.black)
})
}
}
}

struct CartView_Previews: PreviewProvider {
static var previews: some View {
CartView()
}
}
Loading