Page 50 and 51 v4.1 - Errors

Hi there,

I’m having problems with page 50 and 51 of the tutorial. I’ve essentially copied the code word for word but am having some errors pop up:

    if indexPath.row == 0 {
        isChecked = row0item.checked
    }   else if indexPath.row == 1 {

This part of the code gives me the error “Cannot assign value of type ‘Strong’ to type ‘Bool’”

if indexPath.row == 0 { row0item.checked = !row0item.checked

This part gave me the error “No ! candidates produce the expected contextual result type String”

Sorry if these are simple questions but I have no idea what I’m doing wrong…I’m pretty new at this.

Thanks

Unfortunately, Swift’s error messages aren’t being very helpful here. My guess is that elsewhere in the program you’ve typed something wrong or left something out, and now the compiler gets confused.

I would have to see more of the program to make sure, but the first place to look is the definition of the checked variable in the ChecklistItem object.