ios - Insets to UIImageView? -


i'd achieve :

  • scale fill mode of image view
  • insets uiimageview image not meet edges of uiimageview

bottomline: want increase touch area of uiimageview without stretching image beyond size.

is possible through storyboard ? if not can tell how programmatically ?

i can achieve similar functionality through uibutton , setting image inset through storyboard cant find such thing uiimageview.

using method given here :

uiimage *image= [myutil imagewithimage:[uiimage imagenamed:@"myimage"] scaledtosize:cgsizemake(80, 80)];  uiimageview* imgview = [[uiimageview alloc] initwithframe:cgrectmake(0, 0, 100, 100)]; imgview.contentmode = uiviewcontentmodecenter; [imgview setimage:image]; 

now insets become 100-80 i.e. 20 .

this workaround provide insets uiimageview. better answers welcomed.


Comments

Popular posts from this blog

c# - Binding a comma separated list to a List<int> in asp.net web api -

how to prompt save As Box in Excel Interlop c# MVC 4 -

xslt 1.0 - How to access or retrieve mets content of an item from another item? -