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:
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?
You can adjust the onscreen (software) keyboard on iPhone. If you use an external (hardware) keyboard with iPhone, you can customize keyboard shortcuts and change settings such as the key repeat rate.
Tap and hold on the emoji or globe icon on the keyboard. You will see three keyboard icons . Tap the left icon to shrink the keyboard to the left or the right icon to shrink the keyboard to the right. Tap the middle icon to return to the full-sized keyboard.
That seems to be a text field whose keyboardType
is set to UIKeyboardTypeTwitter
, first introduced in iOS 5. It's exactly the same keyboard layout that is used by Tweet Sheets in iOS 5, with the return key being replaced by the @
and #
keys respectively.
Since Instagram happens to use @
for referring to users and #
for tagging posts, just like Twitter, I'm guessing that they're borrowing UIKeyboardTypeTwitter
for convenient use with their own app.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With