I’m trying to create a custom iOS `UIView` and ove...
# multiplatform
m
I’m trying to create a custom iOS
UIView
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?
k
Can you send your Gradle configuration?
m
It’s based on this: https://github.com/bugsnag/kotlin-multiplatform-example/blob/master/common/build.gradle almost identical. I can see iOS classes like UIView and its methods. I can’t see this specific
draw
method
I wanted to do something like this but in Kotlin:
Copy code
override 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?