title: Operations based on user input Swift
body: <p>long question, so bear with me...</p>
  
  <p>I am attempting to create a bitcoin ticker and converter written in Swift. I am using the code below (bits not related to conversion are removed - let me know if I left out anything important)</p>
  
  <pre><code>import UIKit
  
  class ViewController: UIViewController {
  
       @IBOutlet weak var USD: UITextField! //Amount of USD. Originally equals 1 bitcoin, can be changed by user.
       @IBOutlet weak var BTC: UILabel! //Amount of bitcoins the entered amount of USD is worth. Originally 1.
  
      func handler(response: NSURLResponse!, data : NSData!, error : NSError!) { //To fetch Bitcoin Price. This is functional.
  
        if ((error) != nil) {
              self.USD.text = "No Internet" // in case of error
        } else {
              var price = NSString(data:data, encoding:NSUTF8StringEncoding)
              self.USD.text = price //set USD to be equal to price of 1 Bitcoin
  
        }
  
      override func viewDidLoad() {
              //Sets up view
              self.update() //Fetches Bitcoin Price. This works.
              self.convert() //Begins convert method
              var timer = NSTimer.scheduledTimerWithTimeInterval(120, target: self, selector: Selector("update"), userInfo: nil, repeats: true)
     }
  
     func convert() {
              var url = NSURL(string:"https://api.bitcoinaverage.com/ticker/USD/last")
              var request = NSURLRequest(URL: url)
  
              NSURLConnection.sendAsynchronousRequest(request, queue: NSOperationQueue(), completionHandler:handler)
  
              var data = NSData(contentsOfURL:url);
              while true {
                   if USD.text != data {
                   BTC.text = USD.text /  NSString(data:data, encoding:NSUTF8StringEncoding)// Attempts to determine amount of bitcoin the USD amount is worth. ERROR HERE!
              }
  
      }
  </code></pre>
  
  <p>On the line with the comment "ERROR HERE", I get the error</p>
  
  <p><code>/Users/[My User]/Documents/dev/Newest Stuff/CryptoCoinTicker/CryptoCoinTicker/ViewController.swift:95:32: 'String' is not convertible to 'UInt8'</code></p>
  
  <p>In case the code doesn't tell the story, I want BTC.text to change to be equal in value to the amount entered by the user in USD.text (so if a bitcoin is worth $500, and the user entered 250.00, BTC.text would say 0.5.</p>
  
  <p>What do I need to do? Apologies for a (probably) basic question, I am but a newbie. Let me know if you ned more info.</p>
  
  <p>Thanks in advance!</p>