1
votes

I'm looking for a Sencha Touch equivalent of iOS UIViewContentModeScaleAspectFit. As simple as that.

I have an Image component which I want to fit it's width and height to it's container and maintain aspect ratio while doing so.

by fitting to it's container I mean maximizing it as possible without having it cut off anywhere, all parts of the image should remain visible on the screen.

How can it be done?

1

1 Answers

0
votes

You would have to use CSS...check out the background-size 'contain' and 'cover' settings. You can define a class then apply it to your component

:-)