aspectFit
aspectFit is a content mode used in graphical user interfaces, particularly within Apple's development frameworks like UIKit and SwiftUI, to describe how an image or other visual content should be resized to fit within a given bounding box. When an image is set to aspectFit, it scales down while maintaining its original aspect ratio until the entire image fits within the target dimensions. This means that no part of the image will be cropped, but there might be empty space (letterboxing or pillarboxing) within the bounding box if the aspect ratio of the image does not match the aspect ratio of the container.
This mode is often contrasted with aspectFill. aspectFill scales the content to fill the entire bounding box,