title: I'm having trouble with injecting the ViewModel to the properties, Swift
body: <p><strong>I'm having trouble with injecting the viewModel &quot;coinDetail&quot; to the variables</strong>. When I debug, I see that the &quot;coinDetail&quot; has data but the variables don't receive the data. Any advice for solution ? Thanks in advance.</p>
  <pre><code>import UIKit
  import Kingfisher
  
  class CoinDetailViewController: UIViewController {
    
    @IBOutlet weak var coinSymbol: UILabel!
    @IBOutlet weak var coinDetailImageView: UIImageView!
    @IBOutlet weak var coinName: UILabel!
    @IBOutlet weak var coinPrice: UILabel!
    @IBOutlet weak var coinDescription: UITextView!
  
    var coinDetail: Coin? {
      didSet {
        
        setCoinDetail()
      }
    }
    
    
    override func viewDidLoad() {
      super.viewDidLoad()
      // Do any additional setup after loading the view.
     
  
    }
    
    @IBAction func dismiss(_ sender: Any) {
      dismiss(animated: true, completion: nil)
    }
    
    // MARK: - &quot;CoinDetailViewController&quot; Setup Method
    
    func setCoinDetail() {
        
        if let coinDetail = coinDetail {
          
          if let svg = URL(string: coinDetail.iconURL) {
          coinDetailImageView?.downloadedsvg(from: svg)
          } else { return }
          let coinColor = stringToUIColor.hexStringToUIColor(hex: coinDetail.color ?? &quot;&quot;)
          
          coinName?.textColor = coinColor
          coinPrice?.textColor = coinColor
          
          coinSymbol?.text = coinDetail.symbol
          coinName?.text = coinDetail.name
          
          coinDescription?.text = coinDetail.coinDescription
          coinPrice?.text = String.setMinTailingDigits(coinDetail.price)()
          
          
        }
    }
  }
  </code></pre>