mzgreen
01/03/2020, 9:54 AMUIView
and override this function: https://developer.apple.com/documentation/uikit/uiview/1622529-draw but I don’t see it in Kotlin, what may be the reason?Kurt Renzo Acosta
01/03/2020, 9:55 AMmzgreen
01/03/2020, 10:00 AMdraw
methodoverride func draw(_ rect: CGRect) {
if let context = UIGraphicsGetCurrentContext() {
context.addEllipse(in: rect)
context.setFillColor(UIColor.blue.cgColor)
context.fillPath()
}
}
First problem is that I don’t see this draw
method so I can’t override it. Second problem is that even if I create this UIGraphicsGetCurrentContext
object, I can’t see its addEllipse
and other methods. Is it a limitation of Kotlin multiplatform or something is wrong with my config?