Skip to content

Commit 3dec92a

Browse files
authored
Switch from titled "Dismiss" button do system done (#158)
1 parent 7c06030 commit 3dec92a

File tree

5 files changed

+4
-6
lines changed

5 files changed

+4
-6
lines changed

SwiftTweaks/StringOptionViewController.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ internal class StringOptionViewController: UITableViewController {
5151
title = tweak.tweakName
5252
toolbarItems = [
5353
UIBarButtonItem(barButtonSystemItem: .flexibleSpace, target: nil, action: nil),
54-
UIBarButtonItem(title: TweaksViewController.dismissButtonTitle, style: .done, target: self, action: #selector(self.dismissButtonTapped))
54+
UIBarButtonItem(barButtonSystemItem: .done, target: self, action: #selector(self.dismissButtonTapped))
5555
]
5656

5757
self.navigationItem.rightBarButtonItem = UIBarButtonItem(title: "Reset", style: .plain, target: self, action: #selector(StringOptionViewController.restoreDefaultValue))

SwiftTweaks/TweakCollectionViewController.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ internal final class TweakCollectionViewController: UIViewController {
3939

4040
toolbarItems = [
4141
UIBarButtonItem(barButtonSystemItem: .flexibleSpace, target: nil, action: nil),
42-
UIBarButtonItem(title: TweaksViewController.dismissButtonTitle, style: .done, target: self, action: #selector(self.dismissButtonTapped))
42+
UIBarButtonItem(barButtonSystemItem: .done, target: self, action: #selector(self.dismissButtonTapped))
4343
]
4444
}
4545

SwiftTweaks/TweakColorEditViewController.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ internal final class TweakColorEditViewController: UIViewController {
7777
title = tweak.tweakName
7878
toolbarItems = [
7979
UIBarButtonItem(barButtonSystemItem: .flexibleSpace, target: nil, action: nil),
80-
UIBarButtonItem(title: TweaksViewController.dismissButtonTitle, style: .done, target: self, action: #selector(self.dismissButtonTapped))
80+
UIBarButtonItem(barButtonSystemItem: .done, target: self, action: #selector(self.dismissButtonTapped))
8181
]
8282

8383
view.tintColor = AppTheme.Colors.controlGrayscale

SwiftTweaks/TweaksCollectionsListViewController.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ internal final class TweaksCollectionsListViewController: UIViewController {
6161

6262
toolbarItems = [
6363
UIBarButtonItem(barButtonSystemItem: .flexibleSpace, target: nil, action: nil),
64-
UIBarButtonItem(title: "Dismiss", style: .done, target: self, action: #selector(self.dismissButtonTapped))
64+
UIBarButtonItem(barButtonSystemItem: .done, target: self, action: #selector(self.dismissButtonTapped))
6565
]
6666
}
6767

SwiftTweaks/TweaksViewController.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@ public final class TweaksViewController: UIViewController {
2323
public unowned var delegate: TweaksViewControllerDelegate
2424
internal var floatingTweaksWindowPresenter: FloatingTweaksWindowPresenter?
2525

26-
internal static let dismissButtonTitle = NSLocalizedString("Dismiss", comment: "Button to dismiss TweaksViewController.")
27-
2826
public init(tweakStore: TweakStore, delegate: TweaksViewControllerDelegate) {
2927
self.tweakStore = tweakStore
3028
self.delegate = delegate

0 commit comments

Comments
 (0)