Skip to content

Commit de67926

Browse files
keancrazytonyli
andauthored
iOS 26: Fix "Done" and "Close" buttons usage (#24795)
* Update PostStatsVC to use close button * Add missing title * Update a localized string comment --------- Co-authored-by: Tony Li <[email protected]>
1 parent b1c4f22 commit de67926

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

WordPress/Classes/ViewRelated/Stats/PostStatsViewController.swift

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ final class PostStatsViewController: UIViewController {
2222
super.viewDidLoad()
2323

2424
view.backgroundColor = .systemBackground
25+
title = Strings.title
2526

2627
setupStatsView()
2728
setupNavigationBar()
@@ -53,8 +54,8 @@ final class PostStatsViewController: UIViewController {
5354

5455
private func setupNavigationBar() {
5556
if presentingViewController != nil {
56-
navigationItem.rightBarButtonItem = UIBarButtonItem(
57-
barButtonSystemItem: .done,
57+
navigationItem.leftBarButtonItem = UIBarButtonItem(
58+
barButtonSystemItem: .close,
5859
target: self,
5960
action: #selector(dismissViewController)
6061
)
@@ -65,3 +66,7 @@ final class PostStatsViewController: UIViewController {
6566
presentingViewController?.dismiss(animated: true)
6667
}
6768
}
69+
70+
private enum Strings {
71+
static let title = NSLocalizedString("postStats.title", value: "Post Stats", comment: "Navigation bar title of the Post Stats screen")
72+
}

0 commit comments

Comments
 (0)