I\'m experiencing some issues to use Swift in my Objective-C project.
I use the following lib for example (https://github.com/Hearst-DD/ObjectMapper). I\'ve tried the th
In Objective-C you cannot create a class without a superclass. Thats why the @objc will not work without at least NSObject.
So you have to use at least NSObject. Thats how i would do it
@objc class SSStreetAddressRequest: NSObject {
var street:String?
var city:String?
var state:String?
var zip:String?
}
extension SSStreetAddressRequest : Mappable {
required init?(_ map: Map){
}
@objc func mapping(map: Map) {
street <- map["street"]
city <- map["city"]
state <- map["state"]
zip <- map["zip"]
}
}