In swift 3 I could do something like this to make my UIView corners round:
import UIKit
@IBDesignable
class DesignableView: UIView {
}
extension UIView {
    @IBInspectable
    var cornerRadius: CGFloat {
        get {
            return layer.cornerRadius
        }
        set {
            layer.cornerRadius = newValue
        }
    }
}
And at the storyboard I could simply change this:

Currently I'm getting a "Build failed" at the designable, but Idk why. I'm working on swift 4 and Xcode 9.
Why it's not working in swift 4?


