Jelajahi Sumber

move 'cancel' to the right on app selector

unless "cancel" is paired with "done", "save", "ok" or similar
but there is still another button,
"cancel" should go to the right as the primary action of a dialog
(ppl tap there without thinking much to dismiss or move forward -
opening another dialog, is unexpected there, at least in this case)

cmp. other apps
or https://bigmedium.com/ideas/ios-button-placement.html
or apples human interface guidelines (which seem less specific wrt ios)
B. Petersen 2 tahun lalu
induk
melakukan
2b1e52391d
1 mengubah file dengan 4 tambahan dan 4 penghapusan
  1. 4 4
      deltachat-ios/Controller/WebxdcSelector.swift

+ 4 - 4
deltachat-ios/Controller/WebxdcSelector.swift

@@ -49,14 +49,14 @@ class WebxdcSelector: UIViewController {
         return label
     }()
 
-    private lazy var leftBarBtn: UIBarButtonItem = {
+    private lazy var cancelButton: UIBarButtonItem = {
         let btn = UIBarButtonItem(barButtonSystemItem: UIBarButtonItem.SystemItem.cancel,
                                                              target: self,
                                                action: #selector(cancelAction))
         return btn
     }()
 
-    private lazy var rightBarBtn: UIBarButtonItem = {
+    private lazy var filesButton: UIBarButtonItem = {
         let btn = UIBarButtonItem(title: String.localized("files"),
                                   style: .plain,
                                   target: self,
@@ -88,8 +88,8 @@ class WebxdcSelector: UIViewController {
         super.viewDidLoad()
         setupSubviews()
         title = String.localized("webxdc_apps")
-        navigationItem.setLeftBarButton(leftBarBtn, animated: false)
-        navigationItem.setRightBarButton(rightBarBtn, animated: false)
+        navigationItem.setLeftBarButton(filesButton, animated: false)
+        navigationItem.setRightBarButton(cancelButton, animated: false)
         if mediaMessageIds.isEmpty {
             emptyStateView.isHidden = false
         }