Subclassing MKCircle in Swift
问题 I'd like to subclass MKCircle (e.g. MyCircle ) by adding another String property, let's call it " code ". This property shall not be an optional and constant, so I have to set it from an initializer, right? Of course MyCircle should also get center coordinate and the radius. These two properties are read-only, so I also need to set them via initializer. In the end I need an initializer that takes 3 parameters: coordinate , radius and code . Sounds pretty easy but Swifts designated and