tags:

views:

29

answers:

2

Hi all, I need to load a part of an image into a uiimageview... for example an image that is 100x100, only display 100x50... thanks

+2  A: 

I'm not sure if i fully understand your intentions on that, but as far as I'm concerned, partly loading an image would probably be a lot more difficult then just loading the whole image into your imageview and setting its frame accordingly.

samsam
thanks samsam... and how can I do this thing??
ghiboz
+2  A: 

samsam is telling this

uiimageview.image = [UIImage imageNamed:@"myImage.png"];
uiimageview.frame = CGRectMake(x,y,100,50);
uiimageview.contentMode = UIViewContentModeTopLeft;
Sanniv
thanks! and x and y what means? the origin? 0,0?
ghiboz
x and y means the starting position i.e. top left of the image on the view.
Sanniv
thx for coding my recipe sanniv :)
samsam
you are most welcome Samsam :)
Sanniv