Ive been getting this error and have no idea what it means, any advice is welcomed.
import UIKit
class ViewController: UIViewController {
var numberOnScreen:Int = 0;
var converted = " ";
var convert = 0;
@IBOutlet weak var label: UILabel!
@IBAction func numberInput(_ sender: UIButton)
{
label.text = label.text! + String(sender.tag-1)
if numberOnScreen == 0
{
numberOnScreen = 0
}
else
{
numberOnScreen = Int(label.text!)!
}
}
@IBAction func extraButtons(_ sender: UIButton)
{
if sender.tag == 12
{
convert = Int(label.text!)! (Error is here)
converted = String(convert, radix:2)
label.text = String(converted)
}
else if sender.tag == 11
{
numberOnScreen = 0;
convert = 0;
converted = String(0);
label.text = " ";
}
}
override func viewDidLoad() {
super.viewDidLoad()
/
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
/
}
}
Thanks again in advance!