I have a two images with the same constraints and anchors. and when I downscale one of them I get empty bottom space between parent view(red background) and UIImageView(green background). Left image has scale is 100%, right image is 80%
code for constraints:
imageView.heightAnchor.constraint(equalToConstant: 32).isActive = true
imageView.widthAnchor.constraint(equalToConstant: 32).isActive = true
imageView.centerXAnchor.constraint(equalTo: view.centerXAnchor, constant: 0).isActive = true
imageView.bottomAnchor.constraint(equalTo: view.bottomAnchor, constant: 0).isActive = true
downscale code:
imageView.transform = CGAffineTransform(scaleX: scale, y: scale)
how can I move downscaled image to bottom line of view to avoid space between UIView and UIImageView botoms ?
UPDATE:
Also set imageView.contentMode = .bottom
doesn't help