I have a UIImageView inside of my UIViewController. It loads an image that is 81×37 with an origin of 0x20. What I am trying to do is create that image as my background as well as a logo. What I mean by that is when I start my application I would like the image to encompass the whole screen and once I have all my data loaded and ready to display out to the user I would like to shrink it to just be an icon at the upper left hand side of the screen. I would like to say that the code for resizing works, however it seems to stretch the image and cut it off about half way. So either it is rendering outside the dimensions of the screen or only renders what it can.
Below is a code snippet of how I handle my frame resizing which is done in both my viewDidLoad and my isReady functions.
- (void) viewDidLoad
{
originalSize = CGRectMake(self.logoImage.frame.origin.x, self.logoImage.frame.origin.y, self.logoImage.frame.size.width, self.logoImage.frame.size.height);
fullScreenSize = CGRectMake(0.0, 0.0, [[UIScreen mainScreen] bounds].size.width, [[UIScreen mainScreen] bounds].size.height);
[self.logoImage setFrame:fullScreenSize];
}
- (void)isReady:(BOOL)initialized
{
if(initialized)
{
[self.logoImage setFrame:self.originalSize];
}
else
{
[self.logoImage setFrame:self.fullScreenSize];
}
}
I would like to thank Damo for answering my question. The answer is in the comments.