Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

406
Views
How to fix this error ' this class is not key value coding-compliant for the key containerView.'?

When the user what to sign up or login it has error and get this error in the output "this class is not key value coding-compliant for the key containerView." this is the login code also signup has the same error and l'm sure it's a right codes.

import UIKit
import Firebase

class LoginViewController: UIViewController {

  @IBOutlet var Aemeil: UITextField!
  @IBOutlet var Apassword: UITextField!

  override func viewDidLoad() {
      super.viewDidLoad()
  }

  @IBAction func login (_ sender : Any){

      guard let email = Aemeil.text, let password = Apassword.text
        else {
            print("Form is not valid")
            return
      }

      Auth.auth().signIn(withEmail: email , password: password , completion: { (user,error) in
        if error == nil{
            let vc = self.storyboard?.instantiateViewController(withIdentifier: "AHome");
            self.present(vc!, animated: true, completion: nil);
            print("Home page open")
        }
        else{
            let alertController = UIAlertController(title: "Error", message: error?.localizedDescription, preferredStyle: .alert)
            let defaultAction = UIAlertAction(title: "Yes", style: .cancel, handler: nil)

            alertController.addAction(defaultAction)
            self.present(alertController, animated: true, completion: nil)
        }         

    })
  }
}
over 4 years ago · Santiago Trujillo
2 answers
Answer question

0

You have created a binding from a storyboard element, to an element in the corresponding swift file, with the name containerView. After that you have deleted the containerView variable in your swift file, but the binding still exists in the storyboard.

To solve this problem go to your storyboard, click on the view controller, like below:

inspector2

After that, click on the connection inspector, to see all bindings of your viewcontroller and delete the binding from the containerView:

inspector1

over 4 years ago · Santiago Trujillo Report

0

I have faced the similar problem, I created a segmentview under which I've kept a containerView and removed the default segue that came along with that container view. After that I renamed the container view controller name and connected as show segue. This was the problem which caused me to face this issue. When I changed the show segue to Embed segue the problem resolved.

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!