-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #17 from APPSCHOOL1-REPO/221227-productDetail-jegyun
[Add] 레포지토리 생성 이전 작업 추가 #4
- Loading branch information
Showing
15 changed files
with
288 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
...ect-a-customer-ios/big-project-a-customer-ios/Assets.xcassets/ProductDetail/Contents.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
21 changes: 21 additions & 0 deletions
21
...g-project-a-customer-ios/Assets.xcassets/ProductDetail/applewatch1.imageset/Contents.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"filename" : "applewatch1.png", | ||
"idiom" : "universal", | ||
"scale" : "1x" | ||
}, | ||
{ | ||
"idiom" : "universal", | ||
"scale" : "2x" | ||
}, | ||
{ | ||
"idiom" : "universal", | ||
"scale" : "3x" | ||
} | ||
], | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
Binary file added
BIN
+680 KB
...customer-ios/Assets.xcassets/ProductDetail/applewatch1.imageset/applewatch1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions
21
...g-project-a-customer-ios/Assets.xcassets/ProductDetail/applewatch2.imageset/Contents.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"filename" : "applewatch2.png", | ||
"idiom" : "universal", | ||
"scale" : "1x" | ||
}, | ||
{ | ||
"idiom" : "universal", | ||
"scale" : "2x" | ||
}, | ||
{ | ||
"idiom" : "universal", | ||
"scale" : "3x" | ||
} | ||
], | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
Binary file added
BIN
+276 KB
...customer-ios/Assets.xcassets/ProductDetail/applewatch2.imageset/applewatch2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions
21
...g-project-a-customer-ios/Assets.xcassets/ProductDetail/applewatch3.imageset/Contents.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"filename" : "applewatch3.png", | ||
"idiom" : "universal", | ||
"scale" : "1x" | ||
}, | ||
{ | ||
"idiom" : "universal", | ||
"scale" : "2x" | ||
}, | ||
{ | ||
"idiom" : "universal", | ||
"scale" : "3x" | ||
} | ||
], | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
Binary file added
BIN
+967 KB
...customer-ios/Assets.xcassets/ProductDetail/applewatch3.imageset/applewatch3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions
21
...g-project-a-customer-ios/Assets.xcassets/ProductDetail/applewatch4.imageset/Contents.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"filename" : "applewatch4.png", | ||
"idiom" : "universal", | ||
"scale" : "1x" | ||
}, | ||
{ | ||
"idiom" : "universal", | ||
"scale" : "2x" | ||
}, | ||
{ | ||
"idiom" : "universal", | ||
"scale" : "3x" | ||
} | ||
], | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
Binary file added
BIN
+500 KB
...customer-ios/Assets.xcassets/ProductDetail/applewatch4.imageset/applewatch4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions
21
...project-a-customer-ios/Assets.xcassets/ProductDetail/productDetail.imageset/Contents.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"filename" : "productDetail.jpg", | ||
"idiom" : "universal", | ||
"scale" : "1x" | ||
}, | ||
{ | ||
"idiom" : "universal", | ||
"scale" : "2x" | ||
}, | ||
{ | ||
"idiom" : "universal", | ||
"scale" : "3x" | ||
} | ||
], | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
Binary file added
BIN
+1.81 MB
...omer-ios/Assets.xcassets/ProductDetail/productDetail.imageset/productDetail.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions
21
...ct-a-customer-ios/Assets.xcassets/ProductDetail/productInformation.imageset/Contents.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"filename" : "productInformation.png", | ||
"idiom" : "universal", | ||
"scale" : "1x" | ||
}, | ||
{ | ||
"idiom" : "universal", | ||
"scale" : "2x" | ||
}, | ||
{ | ||
"idiom" : "universal", | ||
"scale" : "3x" | ||
} | ||
], | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
Binary file added
BIN
+76.4 KB
...ssets.xcassets/ProductDetail/productInformation.imageset/productInformation.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
141 changes: 141 additions & 0 deletions
141
...ect-a-customer-ios/big-project-a-customer-ios/FolderProductDetail/ProductDetailView.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,141 @@ | ||
// | ||
// ProductDetailView.swift | ||
// ProductDetail | ||
// | ||
// Created by 박희경 on 2022/12/27. | ||
// | ||
|
||
import SwiftUI | ||
|
||
struct ProductDetailView: View { | ||
|
||
@State private var imageHeight: CGFloat = 0 | ||
|
||
|
||
var body: some View { | ||
|
||
VStack { | ||
ScrollView(.vertical) { | ||
|
||
VStack(alignment: .leading) { | ||
TabView { | ||
ForEach(1..<5) { i in | ||
Image("applewatch\(i)") | ||
.resizable() | ||
.aspectRatio(contentMode: .fill) | ||
.frame(width: UIScreen.screenWidth, height: UIScreen.screenWidth) | ||
} | ||
} | ||
.tabViewStyle(.page) | ||
.frame(height: UIScreen.screenWidth) | ||
|
||
Divider() | ||
|
||
VStack(alignment: .leading) { | ||
Text("Apple 애플워치 시리즈 8") | ||
.font(.title2) | ||
.fontWeight(.bold) | ||
.padding(.bottom, 4) | ||
.padding(.top, 6) | ||
|
||
HStack { | ||
Image(systemName: "star") | ||
.renderingMode(.original) | ||
|
||
Text("4.7") | ||
.padding(.trailing, 10) | ||
|
||
Text("리뷰 100건 구매 4,681건") | ||
.font(.caption) | ||
.foregroundColor(.gray) | ||
}.padding(.bottom, 10) | ||
|
||
Text("596,730원") | ||
.font(.title2) | ||
.fontWeight(.bold) | ||
} | ||
.padding(.leading, 15) | ||
|
||
Image("productInformation") | ||
.resizable() | ||
.scaledToFit() | ||
|
||
|
||
Button { | ||
// 버튼을 눌렀을때 image의 height를 최대로 늘려준다. | ||
imageHeight = CGFloat.infinity | ||
} label: { | ||
HStack { | ||
Spacer() | ||
Text("상품정보 더보기") | ||
Spacer() | ||
} | ||
} | ||
|
||
Image("productDetail") | ||
.resizable() | ||
// .scaledToFit() | ||
.aspectRatio(contentMode: .fit) | ||
.frame(height: imageHeight) | ||
|
||
|
||
|
||
|
||
} | ||
|
||
|
||
|
||
|
||
|
||
}//scroll vstack | ||
|
||
HStack { | ||
|
||
Button { | ||
print("") | ||
} label: { | ||
HStack { | ||
Image(systemName: "heart") | ||
.renderingMode(.original) | ||
} | ||
.padding() | ||
.background(.white) | ||
.clipShape(RoundedRectangle(cornerRadius: 10)) | ||
.padding(.horizontal) | ||
} | ||
|
||
Button { | ||
print("") | ||
} label: { | ||
HStack { | ||
Spacer() | ||
Text("구매하기") | ||
.fontWeight(.bold) | ||
Spacer() | ||
} | ||
.padding() | ||
.background(.pink) | ||
.clipShape(RoundedRectangle(cornerRadius: 10)) | ||
.padding(.horizontal) | ||
} | ||
.tint(.white) | ||
// .frame(height: UIScreen.screenWidth-) | ||
} | ||
} | ||
} | ||
|
||
|
||
} | ||
|
||
struct ProductDetailView_Previews: PreviewProvider { | ||
static var previews: some View { | ||
ContentView() | ||
} | ||
} | ||
|
||
extension UIScreen { | ||
static let screenWidth = UIScreen.main.bounds.size.width | ||
static let screenHeight = UIScreen.main.bounds.size.height | ||
static let screenSize = UIScreen.main.bounds.size | ||
static let produectImageHeight: CGFloat = 270.0 | ||
} |