I am having hard to find how I can create a custom Type can use inside @objc.
enum defined in Objc > Declared in Swift > to be used in Objc
Above looks similar, but I still cannot understand.
For example.
import Foundation ;
typealias T = ()-> Void ;
@objc
protocol A {
var t : [ String : T ] { get set } ;
}
Property cannot be a member of an @objc protocol because its type cannot be represented in Objective-C
How can I get rid of this error? Do I have to define something in Objective-C? How can I do it? Will be very appreciate if you can give me am example.
The problem look like if you place a custom type inside Dictionary or Array, this error will appear, how can I resolve it?