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

nightwar00

macrumors newbie
Original poster
Jun 14, 2009
16
0
hi there.
I have a little problem with an UIImageView.
I have improve my SDK to version 3.0 (before 2.2) and the UIImageView don't want to show the image i load :

Code:
menuImage = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"menuImage.png"]];
		[self addSubview:menuImage];
I don't understand why.... is something wrong with the new SDK?
please help
 
Make sure the frame on the UIImageView is what you want. I'm not sure if that method sets the frame size, but most likely the frame origin is not where you want it.
 
thanks for answer.
I put this code and it doesn't work ...
Code:
menuView.frame = CGRectMake(0, 0, 200, 200);
 
Are you sure the UIImage is correctly initialising? Can you split the UIImage creation into it's own statement and check that it's not nil?
 
I have print the value of menuView pointer and i found "0" before initialing and "19580" after so the pointer is correctly initialing..... I don't understand ....
With other project (apple project) the image are correctly display.... Am i missing one line of code ?

i don't understand, in addition my prject display image with sdk 2.2... when i moved to 3.0 the image doesn't display .

any help?
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.