how scale uiimageview proportionally?


i have uiimageview settlement scale down proportionally giving presumably tallness width.



uiimage *image = [[uiimage alloc] initwithdata:[nsdata datawithcontentsofurl:[nsurl urlwithstring:@"http://farm4.static.flickr.com/3092/2915896504_a88b69c9de.jpg"]]];
uiimageview *imageview = [[uiimageview alloc] initwithimage:image];

//add settlement view
[self.view addsubview:imageview];

//set contentmode scale aspect fit
imageview.contentmode = uiviewcontentmodescaleaspectfit;

//change extent frame
cgrect support = imageview.frame;
frame.size.width = 100;
imageview.frame = frame;


the settlement resized nonetheless position during tip left. best proceed scaling image/imageview i repremand position?



Comments

Popular posts from this blog

list macos calm editors formula editors

how hibernate @any-related annotations?

using mvc, should hoop communication between views? between models?