While migrating to Swift 4.0
, I am facing an issue with @IBInspectable
,
open class SVContactBubbleView: UIView
{
@IBInspectable open var dataSource: SVContactBubbleDataSource? //ERROR..!!
@IBInspectable open var delegate: SVContactBubbleDelegate? //ERROR..!!
}
public protocol SVContactBubbleDataSource
{
//Methods here
}
public protocol SVContactBubbleDelegate
{
//Methods here
}
The error that appears is:
Property cannot be marked @IBInspectable because its type cannot be represented in Objective-C
In Swift 3
, it was working fine. I don't understand what went wrong in Swift 4
.
Also, the compiler is not showing any suggestion. It just shows an error message.