How does Instagram customize the UIKeyboard returnKey to an '@' and a '#"?

Viewed 4788

The most recent version of the Instagram iOS app does something interesting. When writing in a text field (e.g., posting a comment), the UIKeyboard's return key has been replaced by two keys: an @ key and a # key. Here's a screenshot:

Screenshot of Instagram keyboard

I would like to know how they do this. As far as I can tell, @ and # keys behave like normal keys: they disappear in keyboards that do not usually have returnKey (such as the emoji keyboard), etc.

The only thing that occurs to me as of now is that the app is getting a reference to the UIKeyboard and looping through the subviews, finding and hiding the returnKey, then finding and moving the @ and # keys. Any other ideas?

1 Answers
Related