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

[Design] Add SettingView #33

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
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
12 changes: 4 additions & 8 deletions Nav.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
objects = {

/* Begin PBXBuildFile section */
11756B8F2A1FC5D000FC8C43 /* SettingView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 11756B8E2A1FC5D000FC8C43 /* SettingView.swift */; };
262C17BE290CDF6900450E54 /* PinCreationView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 262C17BD290CDF6900450E54 /* PinCreationView.swift */; };
262C17C0290D06F700450E54 /* Color+.swift in Sources */ = {isa = PBXBuildFile; fileRef = 262C17BF290D06F700450E54 /* Color+.swift */; };
262C17C2290D090C00450E54 /* Font+.swift in Sources */ = {isa = PBXBuildFile; fileRef = 262C17C1290D090C00450E54 /* Font+.swift */; };
Expand All @@ -27,6 +28,7 @@
/* End PBXBuildFile section */

/* Begin PBXFileReference section */
11756B8E2A1FC5D000FC8C43 /* SettingView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingView.swift; sourceTree = "<group>"; };
262C17BD290CDF6900450E54 /* PinCreationView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PinCreationView.swift; sourceTree = "<group>"; };
262C17BF290D06F700450E54 /* Color+.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Color+.swift"; sourceTree = "<group>"; };
262C17C1290D090C00450E54 /* Font+.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Font+.swift"; sourceTree = "<group>"; };
Expand Down Expand Up @@ -126,6 +128,7 @@
262C17BD290CDF6900450E54 /* PinCreationView.swift */,
FD3389192917B81E00C4AB98 /* ListView.swift */,
DCE7EBD02A172C9000644745 /* SearchBar.swift */,
11756B8E2A1FC5D000FC8C43 /* SettingView.swift */,
);
path = View;
sourceTree = "<group>";
Expand All @@ -146,14 +149,6 @@
path = Extension;
sourceTree = "<group>";
};
26FE54E62949B90100B4E0E9 /* Data */ = {
isa = PBXGroup;
children = (
FDFD7A642928993A001BE945 /* MockData.json */,
);
path = Data;
sourceTree = "<group>";
};
/* End PBXGroup section */

/* Begin PBXNativeTarget section */
Expand Down Expand Up @@ -229,6 +224,7 @@
262C17C2290D090C00450E54 /* Font+.swift in Sources */,
262C17C6290E385E00450E54 /* Text+.swift in Sources */,
262C17C0290D06F700450E54 /* Color+.swift in Sources */,
11756B8F2A1FC5D000FC8C43 /* SettingView.swift in Sources */,
FDFD7A6129289926001BE945 /* Bundle+Ext.swift in Sources */,
262C17CE290E9D4500450E54 /* Image+.swift in Sources */,
26A1501929083B7B00BC7355 /* MapView.swift in Sources */,
Expand Down
4 changes: 2 additions & 2 deletions Nav/ContentView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ struct ContentView: View {
Image(systemName: "list.bullet")
}

PinCreationView()
SettingView()
.tabItem {
Image(systemName: "plus")
Image(systemName: "gearshape")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ํ•ด๋‹น ๋ถ€๋ถ„ ํƒญ ์•„์ด์ฝ˜์— fill์„ ์‚ฌ์šฉํ•˜๊ณ  ์‹ถ์ง€ ์•Š์œผ์‹œ๋‹ค๋ฉด, environment value ์ค‘์—์„œ symbolVariant์— ๊ด€ํ•ด์„œ ์ฐพ์•„๋ณด์‹œ๋ฉด ์ข‹์„ ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ํ•ด๋‹น๋ถ€๋ถ„ ์ข€๋” ์ฐพ์•„๋ณด๊ณ  ์ง„ํ–‰ํ•˜๊ฒ ์Šต๋‹ˆ๋‹ค ใ… ใ… 

Copy link
Collaborator Author

@LiSeul LiSeul Jun 8, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Teb์•„์ด์ฝ˜์ด ๋ชจ๋‘ fill ์ด์—ฌ์„œ... ํ ..... ํšŒ์˜๋–„ ๋ง์”€๋“œ๋ฆฌ๊ฒ ์Š˜๋‹ค! ๐Ÿ˜€

}
}
}
Expand Down
68 changes: 68 additions & 0 deletions Nav/View/SettingView.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
//
// Setting.swift
// Nav
//
// Created by Seulki Lee on 2023/04/21.
//

import SwiftUI

struct SettingView: View {
@State private var isApiModalPresented = false
@State private var isVersionAlert = false
@State private var isLogoutAlert = false
@State private var isResetAlert = false

var body: some View {
NavigationView {
Form{
Section {
Button(action: {
self.isApiModalPresented = true
}) {
Text("์˜คํ”ˆ API")
}
.font(.subheadline)
.foregroundColor(.black)
.sheet(isPresented: $isApiModalPresented) {
// ์˜คํ”ˆ API ๋ชจ๋‹ฌ ๋ทฐ ๊ตฌํ˜„
Text("์˜คํ”ˆ API ๋ชจ๋‹ฌ ํŒ์—…")
}

Button(action: {
self.isVersionAlert = true
}) {
Text("๋ฒ„์ „ ์ •๋ณด")
}
.font(.subheadline)
.foregroundColor(.black)
.alert(isPresented: $isVersionAlert) {
Alert(title: Text("๋ฒ„์ „ ์ •๋ณด"), message: Text("ํ˜„์žฌ ๋ฒ„์ „: 1.0"), dismissButton: .default(Text("ํ™•์ธ")))
}

Button(action: {
self.isResetAlert = true
}) {
Text("์ดˆ๊ธฐํ™”")
}
.font(.subheadline)
.foregroundColor(.black)
.alert(isPresented: $isResetAlert) {
Alert(title: Text("์ดˆ๊ธฐํ™”"), message: Text("์ดˆ๊ธฐํ™” ํ•˜์‹œ๊ฒ ์Šต๋‹ˆ๊นŒ?"), primaryButton: .destructive(Text("์ดˆ๊ธฐํ™”"), action: {
// ์ดˆ๊ธฐํ™” ๋กœ์ง ๊ตฌํ˜„
}), secondaryButton: .cancel(Text("์ทจ์†Œ")))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alert๋“ค์ด ๋ฐ˜๋ณต๋œ๋‹ค๋ฉด Alert๋ฅผ ๋„์šฐ๋Š” ๋ณ€์ˆ˜๋ฅผ ํ•˜๋‚˜๋กœ ํ†ต์ผํ•˜๊ณ , Alert๋“ค์„ ํ•˜๋‚˜์˜ ์ปดํฌ๋„ŒํŠธ๋กœ ๋บ€ ํ›„์—, ๋‚ด๋ถ€ ๋‚ด์šฉ๊ณผ ๋™์ž‘๋งŒ ๋‹ค๋ฅด๊ฒŒ ํ•  ์ˆ˜ ์žˆ๋„๋ก ํ•˜๋ฉด ์–ด๋–จ๊นŒ์š”?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

๋„ต! ๋ณ€๊ฒฝ ์ง„ํ–‰ํ•˜๊ฒ ์Šต๋‹ˆ๋‹ค!

Copy link
Collaborator Author

@LiSeul LiSeul Jun 8, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

d62de0e ๊ณตํ†ต ๋ฒ„ํŠผ์„ ๋‹ด๋‹นํ•˜๋Š” SettingButton ์ถ”๊ฐ€

}
}

}
}

}
}

struct SettingView_Previews: PreviewProvider {
static var previews: some View {
SettingView()
}
}