While updating to Xcode 8 Beta 6, from what I saw a new type got introduced: UIActivityType
So I tried to do somewhere like this in my UIActivity
custom class:
class FooActivity: UIActivity {
func retrieveActivityType() -> String {
return "someStringDescribingActivityType"
}
override open var activityType: UIActivityType? {
@objc(retrieveActivityType)
get {
return UIActivityType(rawValue: "someStringDescribingActivityType")
}
}
}
where retrieveActivityType()
is the Objective-C equivalent since UIActivityType
is only defined in Swift. But no luck so far, still having two errors:
Property cannot be an @objc override because its type cannot be represented in Objective-C
'@objc' getter for non-'@objc' property
Is there something obvious that I'm missing?