0

in alarmring.swift class

@IBOutlet weak var label_msg: UILabel!

override func viewDidLoad() {
    super.viewDidLoad()
    let id = UserDefaults.standard.object(forKey: "selectId")as! Int
    let realm = try! Realm()
    var target_object = realm.objects(Alarmof.self).filter("id == %i",id).first  

    label_msg.text = target_object?.msg

}

My application is crashing with the following error. What does this mean? How can I fix it?

terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[ setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key lable_msg.'

3stud1ant3
  • 3,586
  • 2
  • 12
  • 15

1 Answers1

1

Make sure you link lable_msg in (Contention inspector).

enter image description here

  • i comment "my label_msg don't have more then one assignings" but it have two assignings.....(Delted label's assignings) haha Thnaks for comment – jun Hong Park Sep 03 '17 at 03:37