Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import UIKit
- class ViewController: UIViewController {
- @IBOutlet weak var tableView: UITableView!
- let network = Network()
- let cellReuseIdentifier = "mycell"
- var doubleText: Double?
- override func viewDidLoad() {
- super.viewDidLoad()
- tableView?.register(UINib(nibName: "TableViewCell", bundle: nil), forCellReuseIdentifier: cellReuseIdentifier)
- network.getCurrentCurrency {
- (myCurrency) in
- }
- }
- }
- extension ViewController: UITableViewDataSource, UITableViewDelegate, UITextFieldDelegate {
- func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
- return 1
- }
- func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
- let cell = tableView.dequeueReusableCell(withIdentifier: cellReuseIdentifier, for: indexPath) as! TableViewCell
- return cell
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement