Load XIB this class is not key value coding-compliant for the key

后端 未结 1 1686
轮回少年
轮回少年 2021-02-05 23:13

I just create custom UIView with name PopupViewForViewMoreDetail and I want to add this custom view in my ViewController but each time getting

1条回答
  •  傲寒
    傲寒 (楼主)
    2021-02-05 23:37

    try this :

    step 1:

    let viewMoreDetailPopUp =  UINib(nibName: "PopupViewForViewMoreDetail", bundle: nil).instantiate(withOwner: self, options: nil).first as! PopupViewForViewMoreDetail
    

    step 2: make sure you're setting class for the view instead of File's Owner

    Step 3 : Remove all outlets and re-outlet again

    0 讨论(0)
提交回复
热议问题