NSImageView Aspect Fit ?

I found I need to use Aspect Fit but can't find it anywhere in the IB. Supposedly should be under the Attributes Inspector "Mode" but this doesn't exist. I set the constraints to "Superview" which is a Box an had to set scaling to none otherwise it doesn't fill, programatrically at runtime the image will change and no constant size but doing this resizes the window's width to the new image width. The images are portrait and want to fit into landscape which is why I chose Aspect Fit no Fill.


Has it been depricated or am I missing something ?

Replies

In MacOS, we have scaling axis of NSImageView, that is the closest to the IOS fit (it is really boring to have different concepts in the 2 environments!).


It is effectively in Attributes inspector.

Sorry I mean for MscOS.

Still can't seem to find where the option is if there is one in the IB nor any property.

In MacOS App, I select the Image in IB

Then, in attributes Inspector, atb the top, in Image View section, you have Scaling firld.


But maybe I misunderstand your question.

Can you send an image because I'm pretty sure it's missing.

Could you give me a mail address where to send ?


Which version of SCode (here: Version 10.2.1 (10E1001))

SCode or XCode ? ... 10.2.1


If I can send by private message then I shall. Also, did my last post include an image ? I can see it when I edit the post but not normally. :-/

No, images don't show here. You can paste them, but they do not show !!!!


Strange forum software …

"Then, in attributes Inspector, atb the top, in Image View section, you have Scaling firld."


Don't understand your acronyms, what is "atb" and "firld" ?


https://photos.app.goo.gl/uhJbiENw2BmtQWG47

Sorry for the typos.


Should read


"Then, in attributes Inspector, at the top, in Image View section, you have Scaling field."