0
我遇到了的常见错误致命错误:意外地发现零,同时展开可选值(lldb)。我已经研究过其他问题,但没有一个回答我的问题。致命错误:在解包可选值(lldb)时意外地发现为零(lldb)
的错误出现在下面的代码四号线:
if content[indexPath.row].urgent == true {
cell.urgentLabel.text = "URGENT"
} else {
cell.urgentLabel.text = ""
}
上的其他问题,说我应该在4号线""
,但我会如何解决这个问题,它仍然显示没有文字。
该码与下面的数组:
var content:[Agenda] = [
Agenda(subject: "Read this article", deadline: "1-2 days", urgent: false),
Agenda(subject: "Respond to this email", deadline: "ASAP", urgent: true),
Agenda(subject: "Add this to diary", deadline: "When at home", urgent: true),
Agenda(subject: "Listen to this song", deadline: "When finished working", urgent: false),
Agenda(subject: "Check out this holiday destination", deadline: "At the weekend", urgent: false),
Agenda(subject: "Download this podcast", deadline: "1-4 days", urgent: false),
Agenda(subject: "Update notes", deadline: "When at home", urgent: true)
]
确认emergencyLabel已正确连接。 – Moritz
@ EricD.Oops!这是问题所在。把它作为答案,我会接受它。 –
完成。谢谢。 – Moritz