How to make UIKeyboard not disappear when UIMenuController becomes first responder

Sometimes we want to not allow UIKeyboard disappear. Look at a chat in “WhatsApp” app. When you click twice on a chat item, keyboard doesn’t disappear. At the same time you see a custom UIMenuController. This is not a default behavior. By default keyboard disappears since to show UIMenuController you need to make your chat item view become first responder.

The most popular way to make this happen is to use an invisible UITextField or UITextView and make it becomeFirstReposnder after menu is shown.

But there is a very elegant solution using UIKeyInput Protocol. I found it also at that place.

Documentation tells

A subclass of UIResponder can adopt this protocol to implement simple text entry. When instances of this subclass are the first responder, the system keyboard is displayed.
Only a small subset of the available keyboards and languages are available to classes that adopt this protocol.

So I decided to use this solution. And it worked perfect! You just need to add this protocol to your class definition. For instance:

If iOS app crashes before launch every second time

One of my apps, that I develop started to crush every second time on simulator after I updated XCode Version 4.6.2 and OS X Mountain Lion (OS X 10.8.4). I couldn’t figure out why, because method didFinishLaunchingWithOptions didn’t even start when the crush occured. After some search in the web I found solution here and here.

These are instructions:
Open the menu Product -> Scheme -> Edit Scheme, select Run YouAppName.app on the left, tab Info. Then choose GDB instead of LLDB in debugger field.

The reason of this bug is probably:
The issue occurs to a process race condition for debugserver. Instead of using GDB, you can alternatively kill your execution, wait a few seconds for the app to wrap up, and then run the next iteration.