Цвет границы TextView и радиус границы не заданы

Я хочу установить угловой радиус UITextView по интерфейсу. Но я не в состоянии сделать это. Этот код работает нормально для UILabel, UIButton, но выдает ошибку в UITextView.

class MyText: UITextView {
        @IBInspectable var borderColor: UIColor = UIColor.whiteColor() {
            didSet {
                layer.borderColor = borderColor.CGColor
            }
        }


        @IBInspectable var borderWidth: CGFloat = 1.0 {
            didSet {
                layer.borderWidth = borderWidth
            }
        }

        @IBInspectable var cornurRadius: CGFloat = 1.0 {
            didSet {
                layer.cornerRadius = cornurRadius
                clipsToBounds = true
            }
        }

        //MARK: Initializers
        override init(frame : CGRect) {
            super.init(frame : frame)
            setup()
            configure()
        }

        convenience init() {
            self.init(frame:CGRectZero)
            setup()
            configure()
        }

        required init?(coder aDecoder: NSCoder) {
            super.init(coder: aDecoder)
            setup()
            configure()
        }


        override func awakeFromNib() {
            super.awakeFromNib()
            setup()
            configure()
        }

        override func prepareForInterfaceBuilder() {
            super.prepareForInterfaceBuilder()
            setup()
            configure()
        }

        func setup() {
            layer.borderColor = UIColor.whiteColor().CGColor
            layer.borderWidth = 1.0
            layer.cornerRadius = 1.0
        }

        func configure() {
            layer.borderColor = borderColor.CGColor
            layer.borderWidth = borderWidth
            layer.cornerRadius = cornurRadius
        }

        override func layoutSubviews() {
            super.layoutSubviews()
        }

    }

person Rishab    schedule 24.10.2016    source источник
comment
в методе настройки напишите это. clipsToBounds = true   -  person Mohammad Zaid Pathan    schedule 24.10.2016
comment
Возможный дубликат как установить закругленный угол для UITextView?   -  person Mohammad Zaid Pathan    schedule 24.10.2016
comment
Не работает....   -  person Rishab    schedule 24.10.2016
comment
Добавить @IBDesignable выше объявления класса   -  person Bhavin Ramani    schedule 24.10.2016
comment
Не работает сэр....   -  person Rishab    schedule 24.10.2016
comment
Проверьте это: stackoverflow.com/questions/36759138/   -  person LoVo    schedule 24.10.2016
comment
@LoVo Работает, сэр.. Спасибо, сэр.   -  person Rishab    schedule 24.10.2016
comment
Добро пожаловать, не забудьте проголосовать за ответ Мэтта. Потому что он решил твою проблему   -  person LoVo    schedule 24.10.2016