title: How can I properly do this?
body: <p>I was expecting to put Bitcoin's value change (in an hour) so that if the percentage value of change is less than 0 then it would be written in red color. But if not, it would be on green. But I don't know how to convert a double to a float value in Swift in order to make the comparison.</p>
  
  <p>And show the percentage change in a UILabel by using cocoapods.</p>
  
  <pre><code>func updateBitcoinData(json : JSON) {
      let bitcoinChange = json["changes"]["percent"]["hour"].double
  
      if Float(bitcoinPriceChange) &lt; 0 {
          bitcoinPriceChange.text = "%\(String(describing: bitcoinChange))"
          bitcoinPriceChange.textColor = UIColor.red()
      } else {
          bitcoinPriceChange.text = "%\(String(describing: bitcoinChange))"
          bitcoinPriceChange.textColor = UIColor.green()
      }
  }
  </code></pre>
  
  <blockquote>
    <p>Initializer 'init(_:)' requires that 'UILabel' conform to 'BinaryInteger'
    Cannot call value of non-function type 'UIColor'</p>
  </blockquote>