title: how to overlay an image over an image in xcode?
body: <p>I am trying to make an app where the user can select an image out of their image library that will be used as background, followed by their logo that they can also choose from their (photo) library...</p>
  
  <p>For now i haven't found a tutorial that can help me, mostly because the user must be able to set their own images instead of a default image.
  Also, does anyone of you guys also know how i can have multiple UIImagePickerControllers since this code affects both images at the same time instead of one per picker?</p>
  
  <p>What i use/have :<br/>
  I use swift<br/>
  I use xcode 7.0.1<br/>
  This is 
  <a href="http://i.stack.imgur.com/Vp0ZU.png" rel="noreferrer">the storyboard i currently use</a>.</p>
  
  <p>My swift file :</p>
  
  <pre><code>class ViewController: UIViewController, UIImagePickerControllerDelegate, UINavigationControllerDelegate {
  
    @IBOutlet weak var logo: UIImageView!
    @IBOutlet weak var bgimg: UIImageView!
  
    override func viewDidLoad() {
      super.viewDidLoad()
    }
  
    @IBAction func selectbg(sender: AnyObject) {
      let bgPicker = UIImagePickerController()
      bgPicker.delegate = self
      bgPicker.sourceType = .PhotoLibrary
      self.presentViewController(bgPicker, animated: true, completion: nil)
    }
  
    @IBAction func selectlogo(sender: AnyObject) {
      let logoPicker = UIImagePickerController()
      logoPicker.delegate = self
      logoPicker.sourceType = .PhotoLibrary
      self.presentViewController(logoPicker, animated: true, completion: nil)
    }
  
    func imagePickerController(picker: UIImagePickerController, didFinishPickingImage image: UIImage, editingInfo: [String : AnyObject]?) {
      logo.image = image
      bgimg.image = image
      self.dismissViewControllerAnimated(false, completion: nil)
    }
  
  
    @IBAction func addImage(sender: AnyObject) {
  
      let ActionAlert = UIAlertController(title: nil, message: "What image do you want to add/edit?", preferredStyle: .ActionSheet)
  
      let bgimage = UIAlertAction(title: "Background", style: .Default, handler: { (Alert:UIAlertAction!) -&gt; Void in
          print("Edit background image")
      })
      let logo = UIAlertAction(title: "Logo", style: .Default) { (Alert:UIAlertAction!) -&gt; Void in
          print("Edit logo")
      }
      let cancel = UIAlertAction(title: "Cancel", style: .Cancel) { (Alert:UIAlertAction!) -&gt; Void in
          print("remove menu")
      }
  
      ActionAlert.addAction(bgimage)
      ActionAlert.addAction(logo)
      ActionAlert.addAction(cancel)
  
      self.presentViewController(ActionAlert, animated: true, completion: nil)
  }
  </code></pre>
  
  <p>}</p>
  
  <p>If i wasn't clear about my question, feel free to ask for more info</p>