Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

springframework

macrumors member
Original poster
Mar 31, 2008
59
0
I am using this code to place an image but it doesn't seem to work. The image just gets shown at 0,0

PHP:
UIImage *image = [UIImage imageNamed:@"image.png"];
CGPoint imagepoint = CGPointMake(272,0);
[image drawAtPoint:imagepoint];
UIImageView *imageview = [[UIImageView alloc] initWithImage:(UIImage *)image];
[window addSubView:imageview];

from the class documentation this seems to be the proper way to do things.

what am I doing wrong?
 
thank you, i added this lines in and took out the [image:drawAtPoint] stuff

PHP:
CGRect imageframe = CGRectMake(100,0,44,600);
UIImageView *imageview = [[UIImageView] initWithFrame:imageframe];
imageview.image = image;

it works now
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.