//
//  MovieDetailsViewController.swift
//  Bakalarka
//
//  Created by i332916 on 01/05/2018.
//  Copyright © 2018 i332916. All rights reserved.
//

import UIKit

class MovieDetailsViewController: UIViewController {
    var movie: Movie?
    var moviePoster: UIImage?
    
    @IBOutlet var descriptionLable: UILabel!
    @IBOutlet var actorLable: UILabel!
    @IBOutlet var actorLable2: UILabel!
    @IBOutlet var filmName: UILabel!
    @IBOutlet var directorLable: UILabel!
  
    @IBOutlet var poster: UIImageView!
    override func viewDidLoad() {
        super.viewDidLoad()
          navigationController?.navigationBar.prefersLargeTitles = false
            poster.image = moviePoster
        directorLable.text = movie?.director
//        actorLable.text = movie!.actors
        if let actor1 = movie?.actors?[0]{
            actorLable.text = actor1
        }
        if let actor2 = movie?.actors?[1]{
            actorLable2.text = actor2
        }
        descriptionLable.text = movie?.description
        filmName.text = movie?.name
        
    }

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

    /*
    // MARK: - Navigation

    // In a storyboard-based application, you will often want to do a little preparation before navigation
    override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
        // Get the new view controller using segue.destinationViewController.
        // Pass the selected object to the new view controller.
    }
    */

}
