Skip to content

Commit

Permalink
[FEAT] 세팅뷰 리디자인(#101)
Browse files Browse the repository at this point in the history
  • Loading branch information
kimscastle committed Nov 1, 2024
1 parent 1c6d12f commit 1346a6c
Show file tree
Hide file tree
Showing 16 changed files with 170 additions and 69 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"images" : [
{
"filename" : "arrow_back_ios_24dp_5F6368_FILL1_wght400_GRAD0_opsz24 1.svg",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "arrow_back_ios_24dp_5F6368_FILL1_wght400_GRAD0_opsz24 [email protected]",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "arrow_back_ios_24dp_5F6368_FILL1_wght400_GRAD0_opsz24 [email protected]",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"images" : [
{
"filename" : "Vector.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "[email protected]",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "[email protected]",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"images" : [
{
"filename" : "Vector.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "[email protected]",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "[email protected]",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ struct AddXmarkModifier: ViewModifier {
content
.frame(maxWidth: .infinity, maxHeight: .infinity)
.overlay(alignment: .topTrailing) {
Image(.xmarkEmpty)
Image(.xmarkNew)
.resizable()
.aspectRatio(contentMode: .fit)
.frame(width: 29, height: 29)
.frame(width: 14, height: 14)
.padding(7)
.onTapGesture {
xmarkTap?()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,31 +15,50 @@ struct PhotoDetailWithShareView: View {
var body: some View {
VStack(spacing: 20) {
Rectangle()
.fill(.clear)
.aspectRatio(1/1.5, contentMode: .fit)
.overlay(alignment: .center) {
WebImage(url: URL(string: viewModel.state.imageUrl)) { image in
image
.resizable()
.aspectRatio(contentMode: .fit)
.addDownloadButton { self.viewModel.sendAction(.downloadButtonTap(from: .detailWithShare)) }
} placeholder: {
Image(uiImage: UIImage(resource: .camera))
}
.onSuccess { image, _, _ in
self.viewModel.sendAction(.imageLoad(image))
}
}
.padding(.horizontal, 30)

ShareLink(item: viewModel.getImage, preview: .init("내 사진", image: viewModel.getImage)) {
Text("공유하기")
.shareStyle()
}
.onTapGesture {
viewModel.sendAction(.shareButtonTap)
}
.frame(maxHeight: .infinity)
.overlay(alignment: .bottom) {
HStack {
ShareLink(item: viewModel.getImage, preview: .init("내 사진", image: viewModel.getImage)) {
Text("공유하기")
.pretendard(.subtitle2_16_bold)
.frame(height: 48)
.frame(maxWidth: .infinity)
.foregroundStyle(.geintiBackground)
.background(LinearGradient.gentiGradation)
.cornerRadius(10, corners: .allCorners)
}
.onTapGesture {
viewModel.sendAction(.shareButtonTap)
}

Text("저장하기")
.pretendard(.subtitle2_16_bold)
.frame(height: 48)
.frame(maxWidth: .infinity)
.background(.white)
.foregroundStyle(.geintiBackground)
.cornerRadius(10, corners: .allCorners)
.onTapGesture {
self.viewModel.sendAction(.downloadButtonTap(from: .detailWithShare))
}
}

.padding(.horizontal, 16)
.padding(.bottom, 1)

}
.addXmark(top: 3, trailing: 20) {
viewModel.sendAction(.xmarkTap)
Expand Down
14 changes: 10 additions & 4 deletions Genti_iOS/Genti_iOS/Presentation/Setting/View/SettingRow.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,17 @@ struct SettingRow: View {

var body: some View {
Text(title)
.pretendard(.normal)
.foregroundStyle(.black)
.frame(height: 40)
.pretendard(.subtitle2_16_bold)
.foregroundStyle(.white)
.frame(height: 48)
.frame(maxWidth: .infinity, alignment: .leading)
.padding(.leading, 20)
.overlay(alignment: .trailing) {
Image(.rightShavronNew)
.resizable()
.aspectRatio(contentMode: .fit)
.frame(width: 9, height: 15)
}
.padding(.horizontal, 16)
.background(.black.opacity(0.001))
.onTapGesture {
rowTapped?()
Expand Down
101 changes: 49 additions & 52 deletions Genti_iOS/Genti_iOS/Presentation/Setting/View/SettingView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,22 @@ struct SettingView: View {
var body: some View {

ZStack(alignment: .top) {
backgroundView()
Color.geintiBackground
.ignoresSafeArea()
VStack(spacing: 4) {
headerView()

infoView()

Rectangle()
.fill(.white.opacity(0.3))
.frame(maxWidth: .infinity)
.frame(height: 1)
.padding(.horizontal, 16)
.padding(.vertical, 18)

userView()
Spacer()
footerView()
} //:VSTACK
if viewModel.state.isLoading {
LoadingView()
Expand All @@ -34,32 +43,29 @@ struct SettingView: View {
.toolbar(.hidden, for: .tabBar)
}

private func backgroundView() -> some View {
Color.geintiBackground
.ignoresSafeArea()
}

private func headerView() -> some View {
RoundedRectangle(cornerRadius: 15)
.fill(.green3)
.frame(height: 100)
.overlay(alignment: .bottomLeading) {
Text("설정 및 개인정보")
.pretendard(.normal)
.foregroundStyle(.gray3)
.padding(.bottom, 17)
.padding(.leading, 40)
}
.overlay(alignment: .topLeading) {
Image("Back_fill")
.resizable()
.frame(width: 29, height: 29)
.padding(.leading, 30)
.padding(.top, 16)
.onTapGesture {
self.viewModel.sendAction(.backButtonTap)
}

Text("설정")
.pretendard(.subtitle1_18_bold)
.foregroundStyle(.white)
.frame(maxWidth: .infinity)
.frame(height: 44)
.overlay(alignment: .center) {
HStack(alignment: .center) {
Image(.backNew)
.resizable()
.aspectRatio(contentMode: .fit)
.frame(width: 24, height: 24)
.onTapGesture {
self.viewModel.sendAction(.backButtonTap)
}

Spacer()
}

}
.padding(.horizontal, 16)
.padding(.top, 16)
}
private func infoView() -> some View {
VStack(spacing: 0) {
Expand All @@ -76,49 +82,40 @@ struct SettingView: View {
}

Text("앱 버전 정보")
.pretendard(.normal)
.foregroundStyle(.black)
.frame(height: 40)
.pretendard(.subtitle2_16_bold)
.foregroundStyle(.white)
.frame(height: 48)
.frame(maxWidth: .infinity, alignment: .leading)
.overlay(alignment: .trailing) {
Text(AppStoreCheck.appVersion ?? "1.0.0")
.pretendard(.normal)
.foregroundStyle(.gray3)
}
.padding(.leading, 20)
.padding(.horizontal, 16)

}
.padding(20)
.background(.gray6)
.clipShape(.rect(cornerRadius: 15))
}
private func userView() -> some View {
VStack(spacing: 0) {
SettingRow(title: "로그아웃") {
self.viewModel.sendAction(.logoutRowTap)
}

Text("로그아웃")
.pretendard(.subtitle2_16_bold)
.foregroundStyle(.gentiGreenNew)
.frame(height: 48)
.frame(maxWidth: .infinity, alignment: .leading)
.padding(.horizontal, 16)
.onTapGesture {
self.viewModel.sendAction(.logoutRowTap)
}
Text("회원탈퇴")
.pretendard(.normal)
.foregroundStyle(.gray3)
.frame(height: 40)
.pretendard(.subtitle2_16_bold)
.foregroundStyle(.white.opacity(0.6))
.frame(height: 48)
.frame(maxWidth: .infinity, alignment: .leading)
.padding(.leading, 20)
.background(.gray6)
.padding(.horizontal, 16)
.onTapGesture {
self.viewModel.sendAction(.resignRowTap)
}
}
.padding(20)
.background(.gray6)
.clipShape(.rect(cornerRadius: 15))
}
private func footerView() -> some View {
Image("Genti_LOGO")
.resizable()
.aspectRatio(contentMode: .fit)
.frame(height: 38)
.padding(.bottom, 10)
}
}

Expand Down

0 comments on commit 1346a6c

Please sign in to comment.