I’m using Auto Layout and I have a frame with 2 two images stacked on top of each other. I programmed it so when I resize the outermost frame the images become smaller as well. My only problem is, then everything is at normal size, the images have my wanted vertical spacing between them. Once I start resizing, it’s almost like the two images gain vertical margin and there becomes space between them.
It would be much easier to upload a video, but I’m not allowed to because I’m a new user.
If anyone can help me out, that’d be great.
Thanks so much
So, I understand why. No margin is being added, it just appears that way because the height remains the same but the image gets smaller.
However, when I change height to fill container, just like I have on my width, the height doesn’t decrease when I resize the frame like the width does.
Here a video on google drive.
Do you really have to separate the image?
Since you set the image to
Fit, the image will just fit according to the dimension of its wrap.
Since the wrapper of the image doesn’t scale vertically, the image
Fit will only follow the horizontal dimension and it will follow the wrap until it can Fit inside the wrap. And, that goes both ways (vertically) if you scale it vertically.
If you see in this picture, the height of the image didn’t change because it was only scaled horizontally.
So if you want to scale to fit the image, you have to combine both of them into 1 image or else there would be unwanted margins/padding on the image when you scale the image.
What I advise for you is to create 2 screens: 1 for mobile view and 1 for web view