https://kotlinlang.org logo
Title
d

Derek Ellis

06/14/2020, 10:07 PM
I'm trying to create a Kotlin subclass of
MGLShapeSource
from the Mapbox SDK.
MGLShapeSource
is a subclass of
MGLSource
which has an initializer called
initWithIdentifier
. When I try to create an instance of my Kotlin subclass, I get an exception thrown saying
initWithIdentifier: is not implemented in Shared....KotlinSubclass0
which seems to be the initializer from
MGLSource
so I created another constructor in my subclass to override that initializer but now I get a
EXC_BAD_ACCESS
when that initializer is called. Maybe this is just because I'm not quite as familiar with how Obj-C handles initialization, but I'm not really sure what's happening here?
Is this the limitation on complex class hierarchies that the docs talk about? The way I read it I thought it only applied to subclasses of Kotlin subclasses
a

alex009

06/17/2020, 3:32 PM
maybe this project will be help for you