Class has no initializers Swift

后端 未结 7 1296
迷失自我
迷失自我 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条回答
  •  眼角桃花
    2020-11-28 22:45

    My answer addresses the error in general and not the exact code of the OP. No answer mentioned this note so I just thought I add it.

    The code below would also generate the same error:

    class Actor {
        let agent : String? // BAD! // Its value is set to nil, and will always be nil and that's stupid so Xcode is saying not-accepted.  
        // Technically speaking you have a way around it

提交回复
热议问题