iOS Question AddViewToKeyboard chrash with TextView

Alexander Stolte

Expert
Licensed User
Hey,

i use this code:
B4X:
Sub AddViewToKeyboard(TextField1 As TextView, View1 As View)
    Dim no As NativeObject = TextField1
    no.SetField("inputAccessoryView", View1)
End Sub

i change the "TextField" as a "TextView" and my view is a panel.

And i put this in the page_KeyboardStateChanged event, the keyboard opens, but the view is still on the ground, then i hide the keyboard and click the TextView again, then i run into a error:
B4X:
Error occurred on line: 53 (B4XLoadingIndicator)
child view controller:<UICompatibilityInputViewController: 0x11717faf0> should have parent view controller:Page (vc): Page but requested parent is:<UIInputWindowController: 0x1060b5600>
Stack Trace: (
  CoreFoundation       <redacted> + 252
  libobjc.A.dylib      objc_exception_throw + 56
  CoreFoundation       <redacted> + 0
  UIKit                <redacted> + 304
  UIKit                <redacted> + 1764
  UIKit                <redacted> + 648
  UIKit                <redacted> + 1104
  UIKit                <redacted> + 56
  UIKit                <redacted> + 1716
  UIKit                <redacted> + 2472
 UIKit                <redacted> + 80
 UIKit                <redacted> + 760
 UIKit                <redacted> + 192
 UIKit                <redacted> + 3148
 UIKit                <redacted> + 64
 UIKit                <redacted> + 124
 UIKit                <redacted> + 320
 UIKit                <redacted> + 764
 UIKit                <redacted> + 1096
 UIKit                <redacted> + 404
 UIKit                <redacted> + 276
 UIKit                <redacted> + 3132
 UIKit                <redacted> + 340
 UIKit                <redacted> + 2340
 UIKit                <redacted> + 4744
 UIKit                <redacted> + 152
 CoreFoundation       <redacted> + 24
 CoreFoundation       <redacted> + 276
 CoreFoundation       <redacted> + 1204
 CoreFoundation       CFRunLoopRunSpecific + 552
 GraphicsServices     GSEventRunModal + 100
 UIKit                UIApplicationMain + 236
 Schnattern           main + 124
 libdyld.dylib        <redacted> + 4
)
SignalHandler 6

i dont know why it is on the B4XLoadingindicator class... i have all loading views removed for safety's sake.

This error is happend too if i put this into the show sub and if i tap the textview.
 
Top