Calculator App IOS

//
// ViewController.swift
// demo1
//
// Created by prashant kumar on 31.12.18.
// Copyright © 2018 prashant kumar. All rights reserved.
//

import UIKit

enum modes {
case not_set
case addition
case subtraction
case multiplication
}

class ViewController: UIViewController {

@IBOutlet weak var label: UILabel!

var mode:modes = .not_set

var labelString:String = "0"

override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view, typically from a nib.
}

@IBAction func didPressPlus(_ sender: Any) {
}

@IBAction func didPressMinus(_ sender: Any) {
}

@IBAction func didPressMultiply(_ sender: Any) {
}

@IBAction func didPressEquals(_ sender: Any) {
}

@IBAction func didPressClear(_ sender: Any) {
}

@IBAction func didPressNumber(_ sender: UIButton) {
let value:String? = sender.titleLabel?.text

labelString = labelString.appending(value!)

updateText()
}

func updateText(){
guard let updatedText:Int = Int(labelString) else {
return
}

label.text = "\(updatedText)"
}
}