Cannot subscript a value of type '[NSObject : AnyObject]' with an index of type 'String'
问题 I been getting errors on the snippet of code below. Every time I try to build it, the compiler complains: Cannot subscript a value of type '[NSObject : AnyObject]' with an index of type 'String' Here is the code, in all of its glory: import Foundation import MapKit enum LocationKey: String { case Latitude = "lat" case Longitude = "long" case Title = "title" } extension MKPointAnnotation { var propertyState: [NSObject: AnyObject] { get { return [ LocationKey.Longitude.rawValue as NSObject: