diff options
| author | Sajad Vishkai <sajaclvishkai@gmail.com> | 2022-09-26 11:56:28 +0200 |
|---|---|---|
| committer | Andrej Mihajlov <and@mullvad.net> | 2022-09-26 16:31:21 +0200 |
| commit | cd1afa51e9fd16f6658e63a9da6380b4b753396e (patch) | |
| tree | 9165a18ba9bda7f8b54268d007c5ad6af1b7bdb6 /ios | |
| parent | 63349bae4cc427d22a41fbe6463226bd27beadd0 (diff) | |
| download | mullvadvpn-cd1afa51e9fd16f6658e63a9da6380b4b753396e.tar.xz mullvadvpn-cd1afa51e9fd16f6658e63a9da6380b4b753396e.zip | |
Update AppButton.swift
Diffstat (limited to 'ios')
| -rw-r--r-- | ios/MullvadVPN/AppButton.swift | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/ios/MullvadVPN/AppButton.swift b/ios/MullvadVPN/AppButton.swift index 7704fbe49f..7aa404b7f4 100644 --- a/ios/MullvadVPN/AppButton.swift +++ b/ios/MullvadVPN/AppButton.swift @@ -287,21 +287,6 @@ class CustomButton: UIButton { } } - override func layoutSubviews() { - super.layoutSubviews() - - if #available(iOS 13, *) { - // no-op - } else { - // Fix: on iOS 12 the image view frame is not always set, even though the `UIButton` - // calls `imageRect` to compute the image layout frame. - let imageRect = imageRect(forContentRect: contentRect(forBounds: bounds)) - if imageView?.frame != imageRect { - imageView?.frame = imageRect - } - } - } - private func computeLayout(forContentRect contentRect: CGRect) -> (CGRect, CGRect) { var imageRect = super.imageRect(forContentRect: contentRect) var titleRect = super.titleRect(forContentRect: contentRect) |
