Enum case ‘…’ is not a member of type ‘…’

This way It will work fine :

if true {
    previousState = stateForConversionView

    switch previousState! {
    case .FullOpen:
        stateForConversionView = .HalfOpen
    case .HalfOpen:
        stateForConversionView = .FullOpen
    case .Closed:
        stateForConversionView = .HalfOpen
    default:
        break
    }
}

You need to add !.

For more info refer THIS.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)