Change toRaw() to rawValue for Xcode6.1-beta2.