Quote:
|
Originally Posted by bonehead
Something like this has worked for me:
(from inside your UIViewController loadView)
UIImage* myImage = [UIImage imageNamed:@"fancy_picture.png"];
float newImgHeight = myImage.size.height;
CGRect myViewFrame = CGRectMake(
mViewBounds.origin.x,
mNextViewYOffset,
mViewBounds.size.width,
newImgHeight
);
UIImageView imageView = [[UIImageView alloc] initWithFrame: myViewFrame];
[imageView setImage: myImage];
[self.view addSubview: imageView];
[imageView release];
This assumes that the "fancy_picture.png" file has been added to you XCode project already....
|
Alright, i tried to do what you told me but im not very good at this Objective-C yet. Here is a test project of what I thought you meant but it just returns a lot of errors.
http://www.megaupload.com/?d=TZKITPDC
See if maybe you could fix up the code to make it work, or just make a new one. All I want for the test is to be able to make the button picture appear when i run the program. If you don't have time for this then its ok. Thanks for all the help. Hopefully one day ill be able to figure this out myself.