I have the following code that works good on iOS 5.1 to replace buttons on the toolbar:
[(UIToolbar*)toolbar setItems:itemsArray];
But compiled application doesn’t work on iOS 6. I have compiled sources with xXode 4.5 with iOS 6 support but the error is the same:
2012-09-27 16:31:13.537 Linux[2633:907] -[UIWebFormAccessory setItems:]: unrecognized selector sent to instance 0x1d886ad0
2012-09-27 16:31:13.540 Linux[2633:907] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UIWebFormAccessory setItems:]: unrecognized selector sent to instance 0x1d886ad0'
*** First throw call stack:
(0x361032a3 0x3441397f 0x36106e07 0x36105531 0x3605cf68 0x775c5 0x33bbda6f 0x360d85df 0x360d8291 0x360d6f01 0x36049ebd 0x36049d49 0x365862eb 0x37428301 0x7538d 0x75328)
libc++abi.dylib: terminate called throwing an exception
(lldb)
How to fix the issue?
Linked issue: How to replace buttons on a toolbar under UIWebView keyboard on iOS 6?
Thanks a lot for the help!
UIWebFormAccessory is not a UIToolbar on iOS6. If you want to mess with the form accessory toolbar, check out the “findVirginWebKeyboardToolbar” answer to your related question: https://stackoverflow.com/a/12865353/199267