Christian Sousa
03/17/2020, 12:23 PMUnable to call non-designated initializer as super constructor
.
The code I have is:
private class Select: UITextField {
@OverrideInit
constructor(): super()
override fun caretRectForPosition(position: UITextPosition): CValue<CGRect> {
return CGRectMake(x = 0.0, y = 0.0, width = 0.0, height = 0.0)
}
override fun selectionRectsForRange(range: UITextRange): List<*> {
return listOf<Any?>(null)
}
override fun canPerformAction(action: COpaquePointer?, withSender: Any?): Boolean {
return false
}
}
Anyone know what should I do? I guess I could use disableDesignatedInitializerChecks
but that doesn’t seem rightNikolay Kasyanov
03/17/2020, 12:58 PMsuper(frame: CGRectZero)
, I believeChristian Sousa
03/17/2020, 12:59 PMUITextField(frame = CGRectZero.readValue())
Let’s see if it works 🙂ribesg
03/17/2020, 1:04 PMUITextField(cValue())
should workChristian Sousa
03/17/2020, 1:05 PMoverride fun selectionRectsForRange(range: UITextRange): List<*> {
return listOf<UITextSelectionRect>()
}