Webcore NSBeep ()! when copying from uiwebview

I am developing a monocle epub reader (https://github.com/joseph/Monocle) that runs in uiwebview. My problem is that when I try to copy some text, for example, what we will do in any other uiwebview, it does nothing ... well, I get Webcore NSBeep ()! in the output view.

any idea or approach?

thanx in advance

+6
source share
2 answers

Webcore NSBeep ()! this is an error notification because when you try to copy text from a UIWebview, the text is not copied to your clipboard and the error is notified using a sound signal (IMHO, which is not a reasonable way to notify an error on any platform, it would be any visual indication)

And note: NSBeep () is part of the ApplicationKit environment that does not exist on the iPhone.

0
source

I had the same strange problem, annoying enough that everything worked for quite a while. Then, with some changes, this error occurred. The return code did not help. After a whole day of searching and thinking, I still don't know what caused this, but I know that this is not my code!

My theory is that either my git repository was somehow corrupted, or because I edited my project with a beta version of the IDE + SDK. In any case, you should probably look into re-creating your web view in InterfaceBuilder. Or, re-create your project (or at least partially to confirm that this may be a mistake in the project itself). I think / hope the error disappears then.

0
source

Source: https://habr.com/ru/post/906777/


All Articles