Swift返回错误'二进制运算符==不能应用于两个EKSourceType操作数'

Ada*_*hts 5 ios swift ios8

我在Xcode 6.3中有这样的代码:

let store = EKEventStore()

for source in store.sources() {
    let st: EKSourceType = source.sourceType!
    if st == EKSourceTypeLocal {
        localSource = source;
    }
}
Run Code Online (Sandbox Code Playgroud)

第五行(如果st ..)给出编译器错误:'二进制运算符==不能应用于两个EKSourceType操作数'

如何检查源是否是本地的(在Swift中)并将其编译?

mat*_*att 15

像这样:

if st.value == EKSourceTypeLocal.value
Run Code Online (Sandbox Code Playgroud)