-
Notifications
You must be signed in to change notification settings - Fork 0
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
base: develop
Are you sure you want to change the base?
Changes from 1 commit
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,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("์ทจ์"))) | ||
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. Alert๋ค์ด ๋ฐ๋ณต๋๋ค๋ฉด Alert๋ฅผ ๋์ฐ๋ ๋ณ์๋ฅผ ํ๋๋ก ํต์ผํ๊ณ , Alert๋ค์ ํ๋์ ์ปดํฌ๋ํธ๋ก ๋บ ํ์, ๋ด๋ถ ๋ด์ฉ๊ณผ ๋์๋ง ๋ค๋ฅด๊ฒ ํ ์ ์๋๋ก ํ๋ฉด ์ด๋จ๊น์? 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. d62de0e ๊ณตํต ๋ฒํผ์ ๋ด๋นํ๋ SettingButton ์ถ๊ฐ |
||
} | ||
} | ||
|
||
} | ||
} | ||
|
||
} | ||
} | ||
|
||
struct SettingView_Previews: PreviewProvider { | ||
static var previews: some View { | ||
SettingView() | ||
} | ||
} | ||
|
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.
ํด๋น ๋ถ๋ถ ํญ ์์ด์ฝ์
fill
์ ์ฌ์ฉํ๊ณ ์ถ์ง ์์ผ์๋ค๋ฉด,environment value
์ค์์symbolVariant
์ ๊ดํด์ ์ฐพ์๋ณด์๋ฉด ์ข์ ๊ฒ ๊ฐ์ต๋๋ค.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.
ํด๋น๋ถ๋ถ ์ข๋ ์ฐพ์๋ณด๊ณ ์งํํ๊ฒ ์ต๋๋ค ใ ใ
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.
Teb์์ด์ฝ์ด ๋ชจ๋ fill ์ด์ฌ์... ํ ..... ํ์๋ ๋ง์๋๋ฆฌ๊ฒ ์๋ค! ๐