I am trying to put my image at the center & want to keep the width & height of the image fixed.
I have tried adding constraints : equal width, equal height and have also added a constraint to keep some padding below the label.
When I run it, the size of the image is scaled up and it goes to the top right.
I have tried a lot of permutations & combinations to get it where it in the middle, not of them as worked so far.
According to your requirement, set the constraints
Not equal width
, equal height
. And I believe going to the top right is because there's no valid horizontal alignment.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.