Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit d0cef3a

Browse files
[DEV][Designed Settings]
1 parent b78e9cf commit d0cef3a

File tree

6 files changed

+69
-11
lines changed

6 files changed

+69
-11
lines changed

‎SwiftRorty.iOS.xcodeproj/project.pbxproj‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -394,11 +394,11 @@
394394
E2291D6827A5EA72006D3FD8 /* detail */ = {
395395
isa = PBXGroup;
396396
children = (
397+
E2B5A95C27D0237600C14287 /* DetailStatusView.swift */,
397398
E26BD3A227D01629006CA548 /* DetailHeaderView.swift */,
398399
E26BD3A427D01769006CA548 /* DetailContentView.swift */,
399400
E2555C0E27A872E4007E5266 /* DetailScreen.swift */,
400401
E26BD39E27CFFE51006CA548 /* DetailViewModel.swift */,
401-
E2B5A95C27D0237600C14287 /* DetailStatusView.swift */,
402402
);
403403
path = detail;
404404
sourceTree = "<group>";
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"colors" : [
3+
{
4+
"color" : {
5+
"color-space" : "srgb",
6+
"components" : {
7+
"alpha" : "1.000",
8+
"blue" : "0x2F",
9+
"green" : "0x2F",
10+
"red" : "0xD3"
11+
}
12+
},
13+
"idiom" : "universal"
14+
}
15+
],
16+
"info" : {
17+
"author" : "xcode",
18+
"version" : 1
19+
}
20+
}

‎SwiftRorty.iOS/presentation/features/detail/DetailContentView.swift‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ struct DetailContentView: View {
3030
}
3131
Divider()
3232
}
33-
}.padding(EdgeInsets(top: 16, leading: 12, bottom: 0, trailing: 12))
33+
}
34+
.padding(.init(top: 16, leading: 12, bottom: 0, trailing: 12))
3435
}
3536
}
3637
}

‎SwiftRorty.iOS/presentation/features/detail/DetailScreen.swift‎

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,13 @@ struct DetailScreen: View {
2121
var body: some View {
2222
ZStack {
2323
Color.Background.edgesIgnoringSafeArea(.all)
24-
ScrollView {
25-
LazyVStack {
26-
DetailHeaderView(dto: viewModel.dto)
27-
DetailContentView(contents: viewModel.details, dto: viewModel.dto)
28-
}.padding(12)
24+
LazyVStack {
25+
ScrollView {
26+
LazyVStack {
27+
DetailHeaderView(dto: viewModel.dto)
28+
DetailContentView(contents: viewModel.details, dto: viewModel.dto)
29+
}.padding(12)
30+
}
2931
}
3032
}
3133
.navigationBarTitleDisplayMode(.inline)

‎SwiftRorty.iOS/presentation/features/settings/SettingsScreen.swift‎

Lines changed: 37 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,45 @@
88
import SwiftUI
99

1010
struct SettingsScreen: View {
11+
@State private var nightMode = false
12+
13+
fileprivate func SettingsContentView() -> some View {
14+
return ZStack(alignment: .topLeading) {
15+
RoundedRectangle(cornerRadius: 8, style: .continuous)
16+
.fill(Color.Card).shadow(radius: 1)
17+
18+
VStack(alignment: .leading, spacing: 12) {
19+
HStack(alignment: .center) {
20+
Text("Theme Mode")
21+
.fontTemplate(AppFontTemplate.body4)
22+
Spacer()
23+
Toggle("", isOn: $nightMode)
24+
.toggleStyle(SwitchToggleStyle(tint: .ToggleRed))
25+
}
26+
Divider()
27+
HStack(alignment: .center) {
28+
Text("App Version")
29+
.fontTemplate(AppFontTemplate.body4)
30+
Spacer()
31+
Text("\(UIApplication.appVersion())")
32+
.fontTemplate(AppFontTemplate.body2)
33+
}
34+
35+
}.padding(12)
36+
37+
}.padding(12)
38+
}
39+
1140
var body: some View {
1241
NavigationView {
13-
ZStack {
14-
Color.Background.edgesIgnoringSafeArea(.all)
15-
Text("Settings Screen, Version: \(UIApplication.appVersion())")
16-
.fontTemplate(AppFontTemplate.title)
42+
ZStack(alignment: .topLeading) {
43+
//Color.Background.edgesIgnoringSafeArea(.bottom)
44+
Color.Background.ignoresSafeArea()
45+
LazyVStack(alignment: .leading) {
46+
ScrollView {
47+
SettingsContentView()
48+
}
49+
}
1750
}
1851
.navigationBarTitleDisplayMode(.inline)
1952
.toolbar {

‎SwiftRorty.iOS/theme/Color.swift‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ extension Color {
1919

2020
static let Card = Color(Color.Key.card.rawValue)
2121
static let Text = Color(Color.Key.text.rawValue)
22+
static let ToggleRed = Color(Color.Key.toggleRed.rawValue)
2223

2324
enum Key: String {
2425
case primary = "Primary"
@@ -29,5 +30,6 @@ extension Color {
2930
case unSelectedBottomItem = "UnselectedBottomItemColor"
3031
case card = "Card"
3132
case text = "Text"
33+
case toggleRed = "ToggleRed"
3234
}
3335
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /