Advertisement
Guest User

Untitled

a guest
Sep 15th, 2019
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Swift 0.96 KB | None | 0 0
  1. import UIKit
  2.  
  3. class TableViewCell: UITableViewCell {
  4.    
  5.     var myCurrency: Response?
  6.     let network = Network()
  7.     @IBAction func changeByn(_ sender: UITextField) {
  8.             let bynDouble = Double(sender.text!)
  9.             let doubleUsd = Double(outputLabel.text!)
  10.                 if myCurrency?.usd_byn != nil {
  11.                    var result = bynDouble! / (myCurrency?.usd_byn!)!
  12.                     print(result)
  13.                    outputLabel.text = String(result)
  14.                 }
  15.         }
  16.    
  17.     @IBOutlet weak var bynTextField: UITextField!
  18.     @IBOutlet weak var outputLabel: UILabel!
  19.    
  20.    
  21.     override func awakeFromNib() {
  22.         super.awakeFromNib()
  23.         network.getCurrentCurrency {
  24.             (myCurrency) in
  25.         }
  26.    
  27.     }
  28.  
  29.     override func setSelected(_ selected: Bool, animated: Bool) {
  30.         super.setSelected(selected, animated: animated)
  31.  
  32.         // Configure the view for the selected state
  33.     }
  34.    
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement