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 Build a Simple iPhone App with Swift Improving Our User Interface Finishing Up Our Layout

Nathalie Dory
Nathalie Dory
2,912 Points

I reallly hope someone can help me! Aspect Fill and Bottom Right content mode

So I have an image and there is a man on the bottom right hand corner and a beautiful view for the rest of it. What I would ideally like is for the image to aspect fill the whole background, which I've done, but the problem is when I do this the man disappears!

How can I get the image to aspect fill the area while keeping the man in the bottom right still in the image, this is driving me nuts!

The code so far is

import UIKit

class SecondViewController: UIViewController {

    @IBOutlet weak var BackgroundLoginPage: UIImageView!

    override func viewDidLoad() {
        super.viewDidLoad()
        // Do any additional setup after loading the view, typically from a nib.
    }

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }


}