From f75db3f827057546043c982fc1f4eff54987129a Mon Sep 17 00:00:00 2001 From: dankito Date: Sun, 30 Aug 2020 17:02:59 +0200 Subject: [PATCH] Removed initialImageWidth, just did overwrite value from imageWidth --- ui/BankingiOSApp/BankingiOSApp/ui/views/ScaleImageView.swift | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/ui/BankingiOSApp/BankingiOSApp/ui/views/ScaleImageView.swift b/ui/BankingiOSApp/BankingiOSApp/ui/views/ScaleImageView.swift index 1d242bf9..f2c4cbb2 100644 --- a/ui/BankingiOSApp/BankingiOSApp/ui/views/ScaleImageView.swift +++ b/ui/BankingiOSApp/BankingiOSApp/ui/views/ScaleImageView.swift @@ -12,7 +12,7 @@ struct ScaleImageView: View { private let step: CGFloat - init(_ imageWidth: Binding, _ initialImageWidth: CGFloat? = nil) { + init(_ imageWidth: Binding) { let screenWidth = UIScreen.main.bounds.width let screenWidthQuarter = screenWidth / 4 @@ -22,8 +22,6 @@ struct ScaleImageView: View { let range = imageMaxWidth - imageMinWidth self.init(imageWidth, imageMinWidth: imageMinWidth, imageMaxWidth: imageMaxWidth, step: range / 20) - - self.$imageWidth.wrappedValue = initialImageWidth ?? (imageMinWidth + range / 2) } init(_ imageWidth: Binding, imageMinWidth: CGFloat, imageMaxWidth: CGFloat, step: CGFloat) {