Преглед изворни кода

fix layout constraints for LocationStreamingIndicator

cyberta пре 5 година
родитељ
комит
31c999411e
1 измењених фајлова са 3 додато и 2 уклоњено
  1. 3 2
      deltachat-ios/View/LocationStreamingIndicator.swift

+ 3 - 2
deltachat-ios/View/LocationStreamingIndicator.swift

@@ -28,7 +28,8 @@ class LocationStreamingIndicator: UIImageView {
         tintColor = DcColors.checkmarkGreen
         image =  #imageLiteral(resourceName: "ic_location").withRenderingMode(.alwaysTemplate)
         translatesAutoresizingMaskIntoConstraints = false
-        heightAnchor.constraint(equalToConstant: size).isActive = true
-        widthAnchor.constraint(equalToConstant: aspectRatio * size).isActive = true
+        constraintHeightTo(size, priority: .defaultLow).isActive = true
+        constraintWidthTo(aspectRatio * size).isActive = true
+        contentMode = .scaleAspectFit
     }
 }