Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a shortcut key to fit UIImageView's dimension to a .png?

After adding a UIImageView to Interface Builder and assigning a png filename to it, is there a shortcut key to use the PNG's dimension (width and height) as the UIImageView's dimension?

Thanks!

like image 572
ohho Avatar asked Nov 15 '10 03:11

ohho


People also ask

How do you fit a picture in ImageButton?

Use a android:scaleType="fitCenter" to have Android scale the images, and android:adjustViewBounds="true" to have them adjust their bounds due to scaling. All of these attributes can be set in code on each ImageButton at runtime. However, it is much easier to set and preview in xml in my opinion.

What is adjustViewBounds?

android:adjustViewBounds—If set to true, the attribute adjusts the bounds of the ImageView control to maintain the aspect ratio of the image displayed through it. android:resizeMode—The resizeMode attribute is used to make a control resizable so we can resize it horizontally, vertically, or around both axes.19-Dec-2012.


1 Answers

Size to Fit command, shortcut is Command + '='

Similar to this question: Pictures are very small when added to UIimageview in Interface Builder

like image 193
TomSwift Avatar answered Nov 02 '22 21:11

TomSwift