0
class ReplyContent: UIView {
    var body: String?
    var image: UIImage?

    convenience init(body: String?, image: UIImage?){
        self.body = body
        self.image = image
        self.init()
    }

    required init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }

}

The error states: "Cannot invoke ReplyContent.init with no arguments.

TIMEX
  • 259,804
  • 351
  • 777
  • 1,080

1 Answers1

1

You can't just do UIView.init() with no arguments. You need UIView.init(frame:) or UIView.init(coder:).

BrentM
  • 249
  • 1
  • 4