How to hide button and disable button in swift -4? : I'm new to iOS swift code, trying to create small restaurant app for employees. There I have table numbers as a button if the user clicks that button I want that clicked button to be disabled and I want textfield and another ok button to appear. And if I click on disable button I want that to be enabled. 

    import UIKit

     class ViewController: UIViewController {
    
    var total = 0
    @IBOutlet weak var okButton: UIButton!
    @IBOutlet weak var userInput: UILabel!
    @IBOutlet weak var userValue: UITextField!
    
   
    
      @IBAction func okButton(_ sender: UIButton) {
        
        
       
        if userValue.text != nil{
        userInput.text = String(0)
        let userValueint: Int? = Int(userValue.text!)
        total = total + userValueint!
        let convertText = String(total)
        userInput.text = convertText
        userValue.text = String(0)
        
        userValue.isHidden = true
        
        okButton!.isHidden = true
            
       }
        else{
            print("Please Inter values")
        }
        
       

       }
    
    
      @IBAction func buttenPressed(_ sender: UIButton)
        {
            userValue.isHidden = false
            okButton.isEnabled = true

            

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

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }
    override func viewWillAppear(_ animated: Bool) {
        super.viewWillAppear(animated)
        okButton.isHidden = false
    }
    


   }

So far I'm able to hide textField at the beginning and able to enabled when table button is clicked, but I can't hide ok button and disable the table button. Any suggestion?

   