iOS Question View not compliant

John Sturt

Active Member
Licensed User
Longtime User
Hello
I am trying to set a view to accept touches or gestures while voiceover is turned on.

This is the error i get from running the attached example project.

I have tried several variants of views and native object declarations to no effect.

Any ideas as i have no ideas left
Thanks

Application_Start
Error occurred on line: 36 (Main)
[<B4IPanelView 0x10311b050> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key UIAccessibilityTraitAllowsDirectInteraction:.
Stack Trace: (
CoreFoundation F80FCA31-BF76-3293-8BC6-1729588AE8B6 + 1155368
libobjc.A.dylib objc_exception_throw + 56
CoreFoundation F80FCA31-BF76-3293-8BC6-1729588AE8B6 + 177376
Foundation 4B7B9C0A-BAD3-348D-95A3-94784BFED02E + 182056
UIKitCore 00EA1426-38F7-3FD2-BE01-04EBD44ECA35 + 16932216
Example Code -[B4INativeObject SetField::] + 132
Example Code -[b4i_main _application_start:] + 2008
CoreFoundation F80FCA31-BF76-3293-8BC6-1729588AE8B6 + 1173616
CoreFoundation F80FCA31-BF76-3293-8BC6-1729588AE8B6 + 8144
Example Code +[B4I runDynamicMethod:method:throwErrorIfMissing:args:] + 1608
Example Code -[B4IShell runMethod:] + 448
Example Code -[B4IShell raiseEventImpl:method:args::] + 1648
Example Code -[B4IShellBI raiseEvent:event:params:] + 1580
Example Code __33-[B4I raiseUIEvent:event:params:]_block_invoke + 60
libdispatch.dylib A564FA91-A3E3-3A41-AFD1-410FAD72E52A + 393880
libdispatch.dylib A564FA91-A3E3-3A41-AFD1-410FAD72E52A + 397952
libdispatch.dylib A564FA91-A3E3-3A41-AFD1-410FAD72E52A + 66108
CoreFoundation F80FCA31-BF76-3293-8BC6-1729588AE8B6 + 629808
CoreFoundation F80FCA31-BF76-3293-8BC6-1729588AE8B6 + 606440
CoreFoundation CFRunLoopRunSpecific + 572
GraphicsServices GSEventRunModal + 160
UIKitCore 00EA1426-38F7-3FD2-BE01-04EBD44ECA35 + 11669508
UIKitCore UIApplicationMain + 164
Example Code main + 124
libdyld.dylib 77E57314-8A58-3064-90C0-8AF9A4745430 + 5528
)
Application_Active
 

Attachments

  • not compliant.zip
    505 KB · Views: 159

Semen Matusovskiy

Well-Known Member
Licensed User
Replace no.SetField("UIAccessibilityTraitAllowsDirectInteraction:",True) to
B4X:
    no.SetField("isAccessibilityElement", True)
    no.SetField("accessibilityTraits", 0x2000) ' = UIAccessibilityTraitAllowsDirectInteraction
 
Upvote 0
Top