-
Notifications
You must be signed in to change notification settings - Fork 1
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
[Feat] #4 SettingView - MySettingView 구현 #21
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
// | ||
// MyProfileEditView.swift | ||
// EZPZ | ||
// | ||
// Created by 최홍준 on 2022/10/23. | ||
// | ||
|
||
import Foundation |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
// | ||
// MyProfileView.swift | ||
// EZPZ | ||
// | ||
// Created by 최홍준 on 2022/10/23. | ||
// | ||
|
||
import SwiftUI | ||
|
||
struct MyProfileView: View { | ||
var body: some View { | ||
ZStack { | ||
RoundedRectangle(cornerRadius: 10) | ||
.fill(Color.grayScale5) | ||
.frame(width: 356, height: 500) | ||
HStack { | ||
Spacer() | ||
Button(action: { | ||
// some action | ||
}) { | ||
Image(systemName: "gearshape.fill") | ||
.foregroundColor(Color.grayScale1) | ||
.padding(.leading, 329) | ||
.padding(.trailing, 46) | ||
.padding(.bottom, 450) | ||
Comment on lines
+23
to
+25
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. padding을 한번에 묶어서 값을 줄 수 있을 것 같아요! |
||
} | ||
} | ||
VStack { | ||
// 이미지를 받으면 넣을 부분 | ||
RoundedRectangle(cornerRadius: 10) | ||
.fill(Color.grayScale2) | ||
.frame(width: 273, height: 280.34) | ||
.padding(.top, -170.66) | ||
.padding(.bottom, 18) | ||
} | ||
} | ||
} | ||
} | ||
|
||
struct MyProfileView_Previews: PreviewProvider { | ||
static var previews: some View { | ||
MyProfileView() | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
// | ||
// MySettingView.swift | ||
// EZPZ | ||
// | ||
// Created by 최홍준 on 2022/10/21. | ||
// | ||
|
||
import SwiftUI | ||
|
||
struct MySettingView: View { | ||
var body: some View { | ||
ZStack(alignment: .top) { | ||
Color.ezpzBlack.ignoresSafeArea() | ||
ScrollView { | ||
VStack { | ||
HStack { | ||
Text("나의 프로필") | ||
.setBasicTitle2() | ||
.padding(.leading, 17) | ||
Spacer() | ||
} | ||
.padding(.top, 3) | ||
.padding(.bottom, 8) | ||
|
||
MyProfileView() | ||
|
||
HStack { | ||
Text("설정") | ||
.setBasicTitle2() | ||
.padding(.leading, 17) | ||
Spacer() | ||
} | ||
.padding(.top, 26) | ||
.padding(.bottom, 18) | ||
|
||
SettingListView() | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
struct MySettingView_Previews: PreviewProvider { | ||
static var previews: some View { | ||
MySettingView() | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
// | ||
// SettingListView.swift | ||
// EZPZ | ||
// | ||
// Created by 최홍준 on 2022/10/23. | ||
// | ||
|
||
import SwiftUI | ||
|
||
struct SettingListView: View { | ||
var body: some View { | ||
ZStack { | ||
RoundedRectangle(cornerRadius: 10) | ||
.fill(Color.grayScale5) | ||
.frame(width: 356, height: 232) | ||
VStack { | ||
HStack { | ||
Text("앱 버전 정보") | ||
.setBasicBody() | ||
.padding(.leading, 36) | ||
.padding(.top, 4) | ||
.padding(.bottom, 2.55) | ||
Spacer() | ||
} | ||
Divider() | ||
.frame(width: 356, height: 1) | ||
.background(Color.white.opacity(0.2)) | ||
HStack { | ||
Text("푸쉬 알림 설정") | ||
.setBasicBody() | ||
.padding(.leading, 36) | ||
.padding(.top, 1.45) | ||
.padding(.bottom, 2.55) | ||
Spacer() | ||
} | ||
Divider() | ||
.frame(width: 356, height: 1) | ||
.background(Color.white.opacity(0.2)) | ||
HStack { | ||
Text("라이센스 정보") | ||
.setBasicBody() | ||
.padding(.leading, 36) | ||
.padding(.top, 1.45) | ||
.padding(.bottom, 2.55) | ||
Spacer() | ||
} | ||
Comment on lines
+17
to
+46
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 반복적으로 사용한는 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. List가 아닌 Stack을 사용하였는데, Stack을 더욱 잘게 만들어서 따로 뷰로 만들어보겠습니다! |
||
Divider() | ||
.frame(width: 356, height: 1) | ||
.background(Color.white.opacity(0.2)) | ||
HStack { | ||
Text("이용 약관") | ||
.setBasicBody() | ||
.padding(.leading, 36) | ||
.padding(.top, 1.45) | ||
.padding(.bottom, 2.55) | ||
Spacer() | ||
} | ||
Divider() | ||
.frame(width: 356, height: 1) | ||
.background(Color.white.opacity(0.2)) | ||
.padding(.bottom, -4) | ||
Divider() | ||
.frame(width: 356, height: 1) | ||
.background(Color.white.opacity(0.2)) | ||
.padding(.top, -4) | ||
Comment on lines
+58
to
+65
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
HStack { | ||
Text("도전 포기하기") | ||
.font(Font.custom("SpoqaHanSans-Regular", size: 17)) | ||
.foregroundColor(Color.red) | ||
.padding(.leading, 36) | ||
.padding(.top, -7.45) | ||
.padding(.bottom, 5) | ||
Spacer() | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
struct SettingListView_Previews: PreviewProvider { | ||
static var previews: some View { | ||
SettingListView() | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
MyProfileView의 레이아웃을 설정 탭에서 확인하고자 코드를 작성하였습니다.
작업하면서 수정될 코드들입니다.