Class has no initializers Swift

后端 未结 7 1340
迷失自我
迷失自我 2020-11-28 22:17

I have a problem with Swift class. I have a swift file for UITableViewController class and UITableViewCell class. My problem is the UITableViewCell class, and outlets. This

7条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-11-28 22:30

    Quick fix - make sure all variables which do not get initialized when they are created (eg var num : Int? vs var num = 5) have either a ? or !.

    Long answer (reccomended) - read the doc as per mprivat suggests...

提交回复
热议问题