diff options
| author | Sajad Vishkai <sajaclvishkai@gmail.com> | 2022-09-26 12:05:18 +0200 |
|---|---|---|
| committer | Andrej Mihajlov <and@mullvad.net> | 2022-09-26 16:31:21 +0200 |
| commit | 72d2c697d0f70d9bfa1155e5df7e9d39fbcf949a (patch) | |
| tree | d832bbd668eafd638afae52c19417cee4718789d /ios | |
| parent | 0934bd99c0c926838588d5560edb60b74f929bde (diff) | |
| download | mullvadvpn-72d2c697d0f70d9bfa1155e5df7e9d39fbcf949a.tar.xz mullvadvpn-72d2c697d0f70d9bfa1155e5df7e9d39fbcf949a.zip | |
Update UIBarButtonItem+KeyboardNavigation.swift
Diffstat (limited to 'ios')
| -rw-r--r-- | ios/MullvadVPN/UIBarButtonItem+KeyboardNavigation.swift | 33 |
1 files changed, 10 insertions, 23 deletions
diff --git a/ios/MullvadVPN/UIBarButtonItem+KeyboardNavigation.swift b/ios/MullvadVPN/UIBarButtonItem+KeyboardNavigation.swift index f42e7a2f7b..ca17e2510a 100644 --- a/ios/MullvadVPN/UIBarButtonItem+KeyboardNavigation.swift +++ b/ios/MullvadVPN/UIBarButtonItem+KeyboardNavigation.swift @@ -31,7 +31,6 @@ extension UIBarButtonItem { } } - @available(iOS 13, *) fileprivate var systemImage: UIImage? { switch self { case .previous: @@ -47,21 +46,13 @@ extension UIBarButtonItem { target: Any?, action: Selector? ) { - if #available(iOS 13, *) { - self.init( - image: keyboardNavigationItemType.systemImage, - style: .plain, - target: target, - action: action - ) - } else { - self.init( - title: keyboardNavigationItemType.localizedTitle, - style: .plain, - target: target, - action: action - ) - } + self.init( + image: keyboardNavigationItemType.systemImage, + style: .plain, + target: target, + action: action + ) + accessibilityLabel = keyboardNavigationItemType.localizedTitle } @@ -82,13 +73,9 @@ extension UIBarButtonItem { configurationBlock(prevButton, nextButton) - if #available(iOS 13, *) { - let spacer = UIBarButtonItem(barButtonSystemItem: .fixedSpace, target: nil, action: nil) - spacer.width = 8 + let spacer = UIBarButtonItem(barButtonSystemItem: .fixedSpace, target: nil, action: nil) + spacer.width = 8 - return [prevButton, spacer, nextButton] - } else { - return [prevButton, nextButton] - } + return [prevButton, spacer, nextButton] } } |
