Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

iOS Implementing Designs for iPhone Implementing Custom Login and Sign Up Screens Setting Background Images for Various Screen Sizes

Joey Shiner
Joey Shiner
8,372 Points

Set Background images for various screen sizes

I'm using Xcode 5.1.1 I've imported my 3 different background image sizes for all 3 screens. My storyboard is using the 3.5 in screens and I'm trying to set the background image for the 4 in retina display. I followed the video by creating an IBOutlet of the UIImageView and putting the code in the viewDidLoad method. Every time I load up the 4 in retina simulator, the screen is white. I've tried cleaning the project and restarting Xcode, but nothing is working.

I'm sure it's an easy fix that I'm missing!

2 Answers

can i see your code

Joey Shiner
Joey Shiner
8,372 Points

This is the initial view controller that is displayed being pushed with a manual segue if not logged in

Implementation '''iOS

if ([UIScreen mainScreen].bounds.size.height == 568) {
    self.backgroundImageView.image = [UIImage imageNamed:@"SplashBackground-568h"];
}

}