What piece am I missing to set an iOS background?
I have:
[A series of if statements sets backgroundImage to be something like
[UIImageNamed @"Background-Default-Landscape"]; am I right to assume that
the device will look for the file named
Background-Default-Landscape@2x.png if it is a Retina display?]
UIImageView *backgroundView = [[UIImageView alloc]
initWithImage:backgroundImage];
CGRect containerRect = CGRectZero;
containerRect.size = [backgroundImage size];
UIView *containerView = [[UIView alloc] initWithFrame:containerRect];
[containerView addSubview:backgroundView];
Right now my app is launching and once it loads displays a white screen,
not a background specified (none of the backgrounds are solid white).
What am I missing to draw a background before I start putting things on
the background, further below in the code?
Thanks,
No comments:
Post a Comment