Skip to content

Commit 6a1d373

Browse files
committed
Renamed SettingsRow to a more suitable name
1 parent a670942 commit 6a1d373

3 files changed

Lines changed: 19 additions & 19 deletions

File tree

Template.xcodeproj/project.pbxproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
1FAC1FB22A6AF4830083E64C /* TemplateApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1FAC1FB12A6AF4830083E64C /* TemplateApp.swift */; };
1515
1FAC1FB62A6AF4840083E64C /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 1FAC1FB52A6AF4840083E64C /* Assets.xcassets */; };
1616
1FAC1FBA2A6AF4840083E64C /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 1FAC1FB92A6AF4840083E64C /* Preview Assets.xcassets */; };
17-
1FAC1FD42A6B042C0083E64C /* SettingsRow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1FAC1FD32A6B042C0083E64C /* SettingsRow.swift */; };
17+
1FAC1FD42A6B042C0083E64C /* TitleSubtitleRow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1FAC1FD32A6B042C0083E64C /* TitleSubtitleRow.swift */; };
1818
1FAC1FD52A6B04440083E64C /* ChevronView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1FAC1FD22A6B040C0083E64C /* ChevronView.swift */; };
1919
1FAC1FD72A6B04AE0083E64C /* Colors.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1FAC1FD62A6B04AE0083E64C /* Colors.swift */; };
2020
1FAC1FD92A6B05B10083E64C /* Colors.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 1FAC1FD82A6B05B10083E64C /* Colors.xcassets */; };
@@ -58,7 +58,7 @@
5858
1FAC1FB72A6AF4840083E64C /* Template.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = Template.entitlements; sourceTree = "<group>"; };
5959
1FAC1FB92A6AF4840083E64C /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = "<group>"; };
6060
1FAC1FD22A6B040C0083E64C /* ChevronView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChevronView.swift; sourceTree = "<group>"; };
61-
1FAC1FD32A6B042C0083E64C /* SettingsRow.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingsRow.swift; sourceTree = "<group>"; };
61+
1FAC1FD32A6B042C0083E64C /* TitleSubtitleRow.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TitleSubtitleRow.swift; sourceTree = "<group>"; };
6262
1FAC1FD62A6B04AE0083E64C /* Colors.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Colors.swift; sourceTree = "<group>"; };
6363
1FAC1FD82A6B05B10083E64C /* Colors.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Colors.xcassets; sourceTree = "<group>"; };
6464
1FAC1FDB2A6B05F80083E64C /* AboutViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AboutViewModel.swift; sourceTree = "<group>"; };
@@ -179,7 +179,7 @@
179179
children = (
180180
1FAC1FD22A6B040C0083E64C /* ChevronView.swift */,
181181
1FAC1FEB2A6B0BDC0083E64C /* README.md */,
182-
1FAC1FD32A6B042C0083E64C /* SettingsRow.swift */,
182+
1FAC1FD32A6B042C0083E64C /* TitleSubtitleRow.swift */,
183183
1FAC1FDD2A6B063C0083E64C /* SFSafariView.swift */,
184184
1FAC1FDF2A6B06520083E64C /* ShareSheetView.swift */,
185185
);
@@ -467,7 +467,7 @@
467467
1FAC1FD52A6B04440083E64C /* ChevronView.swift in Sources */,
468468
1FAC1FD72A6B04AE0083E64C /* Colors.swift in Sources */,
469469
1FAC1FE52A6B08580083E64C /* Globals.swift in Sources */,
470-
1FAC1FD42A6B042C0083E64C /* SettingsRow.swift in Sources */,
470+
1FAC1FD42A6B042C0083E64C /* TitleSubtitleRow.swift in Sources */,
471471
1FAC1FDE2A6B063C0083E64C /* SFSafariView.swift in Sources */,
472472
1FAC1FE02A6B06520083E64C /* ShareSheetView.swift in Sources */,
473473
1FAC1FB22A6AF4830083E64C /* TemplateApp.swift in Sources */,

Template/Components/SettingsRow.swift renamed to Template/Components/TitleSubtitleRow.swift

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
//
2-
// SettingsRow.swift
2+
// TitleSubtitleRow.swift
33
// Template
44
//
55
// Created by Marcel Hoppe on 21.07.23.
66
//
77

88
import SwiftUI
99

10-
struct SettingsRow: View {
10+
struct TitleSubtitleRow: View {
1111
let systemName: String?
1212
let title: String
1313
let subtitle: String?
@@ -45,15 +45,15 @@ struct SettingsRow: View {
4545
}
4646
}
4747

48-
struct SettingsRow_Previews: PreviewProvider {
48+
struct TitleSubtitleRow_Previews: PreviewProvider {
4949
static var previews: some View {
5050
Form {
51-
SettingsRow(title: "Preview")
52-
SettingsRow(title: "Preview", showArrow: true)
53-
SettingsRow(title: "Preview", subtitle: "Preview")
54-
SettingsRow(title: "Preview", subtitle: "Preview", showArrow: true)
55-
SettingsRow(systemName: "globe", title: "Preview", subtitle: "Preview")
56-
SettingsRow(systemName: "globe", title: "Preview", subtitle: "Preview", showArrow: true)
51+
TitleSubtitleRow(title: "Preview")
52+
TitleSubtitleRow(title: "Preview", showArrow: true)
53+
TitleSubtitleRow(title: "Preview", subtitle: "Preview")
54+
TitleSubtitleRow(title: "Preview", subtitle: "Preview", showArrow: true)
55+
TitleSubtitleRow(systemName: "globe", title: "Preview", subtitle: "Preview")
56+
TitleSubtitleRow(systemName: "globe", title: "Preview", subtitle: "Preview", showArrow: true)
5757
}
5858
}
5959
}

Template/Screens/About/AboutView.swift

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,41 +18,41 @@ struct AboutView: View {
1818
.listRowBackground(Color.clear)
1919

2020
Section {
21-
SettingsRow(title: "Website", subtitle: URL.website?.host, showArrow: true)
21+
TitleSubtitleRow(title: "Website", subtitle: URL.website?.host, showArrow: true)
2222
.contentShape(Rectangle())
2323
.onTapGesture {
2424
URL.website?.open()
2525
}
2626

27-
SettingsRow(title: "Twitter", subtitle: "@\(MainConstants.twitterUsername)", showArrow: true)
27+
TitleSubtitleRow(title: "Twitter", subtitle: "@\(MainConstants.twitterUsername)", showArrow: true)
2828
.contentShape(Rectangle())
2929
.onTapGesture {
3030
viewModel.openTwitter()
3131
}
3232
}
3333

3434
Section {
35-
SettingsRow(title: "Open Source Licences", showArrow: true)
35+
TitleSubtitleRow(title: "Open Source Licences", showArrow: true)
3636
.contentShape(Rectangle())
3737
.onTapGesture {
3838
UIApplication.openSystemSettings()
3939
}
4040

41-
SettingsRow(title: "Terms of Use", showArrow: true)
41+
TitleSubtitleRow(title: "Terms of Use", showArrow: true)
4242
.contentShape(Rectangle())
4343
.onTapGesture {
4444
viewModel.activeSheet = .termsOfUse
4545
}
4646

47-
SettingsRow(title: "Privacy Policy", showArrow: true)
47+
TitleSubtitleRow(title: "Privacy Policy", showArrow: true)
4848
.contentShape(Rectangle())
4949
.onTapGesture {
5050
viewModel.activeSheet = .privacyPolicy
5151
}
5252
}
5353

5454
Section {
55-
SettingsRow(title: "Share Template", showArrow: true)
55+
TitleSubtitleRow(title: "Share Template", showArrow: true)
5656
.foregroundColor(.accentColor)
5757
.contentShape(Rectangle())
5858
.onTapGesture {

0 commit comments

Comments
 (0)