How Can I Add a Background Image for FirebaseUI Login for iOS?
<p>I'd like to be able to place a background image behind the three sign-in buttons (for Google, Facebook, and Email) of the FirebaseUI login screen. FirebaseUI login is a drop-in authentication solution for iOS, Android, and Web. I'm having trouble with iOS.</p>

<p>There's a little bit of advice on <a href="https://github.com/firebase/FirebaseUI-iOS/issues/87" rel="noreferrer">Github</a>, but not enough.</p>

<p>I first initialize my <code>var customAuthPickerViewController : FIRAuthPickerViewController!</code> near the top of the ViewController.swift file.</p>

<p>Then, this is the function in my ViewController.swift file, but it's not working. When I click the logout button, the app crashes, and no background image is ever shown.</p>

<pre><code>// Customize the sign-in screen to have the Bizzy Books icon/background image

func authPickerViewController(for authUI: FIRAuthUI) -&gt; FIRAuthPickerViewController {

    customAuthPickerViewController = authPickerViewController(for: authUI)
    backgroundImage = UIImageView(image: UIImage(named: "bizzybooksbee"))
    backgroundImage.contentMode = UIViewContentMode.scaleAspectFill
    customAuthPickerViewController.view.addSubview(backgroundImage)

    return customAuthPickerViewController
}
</code></pre>

<p>The background image "bizzybooksbee" is a Universal Image Set with 1x, 2x, and 3x images already loaded in my Assets.xcassets folder.</p>

<p>Here's <a href="https://www.dropbox.com/s/rm68mya7jyryner/Screenshot%202016-10-07%2009.57.33.png?dl=0" rel="noreferrer">a picture of what the login screen looks like</a> without trying to implement the background image.</p>

<p><a href="https://i.stack.imgur.com/gwS2J.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/gwS2J.jpg" alt="enter image description here"></a></p>

<p>UPDATE: I'm able to get the image to show, with the code I gave in the comments below, but it shows OVER the sign-in buttons, as in the pic below.</p>

<p><a href="https://i.stack.imgur.com/RsSom.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/RsSom.jpg" alt="enter image description here"></a></p>

<p>Here's an image of the "heirarchy," with Jeffrey's help:</p>

<p><a href="https://i.stack.imgur.com/omtxA.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/omtxA.jpg" alt="enter image description here"></a></p>