Sometimes we want our apps to support multiple languages to reach a higher audience.
This is when we turn to localization.
Localization is about the content.
Internationalization is about the UI.
Localizing our app consists of 2 basic steps:
Do you remember those notes kids would pass around when we were in middle school asking “Do you like me”?
The ternary operator is the equivalent of them in code.
When you use the ternary operator you’re asking a question that can either be true or false. When it’s true, the code after the “?” gets executed and when it’s false, the code after the “:” gets executed.
Recently I have been working on a custom keyboard extension.
I wanted it to be of the same size of the original iOS keyboard. I noticed that almost all of the devices have different keyboard heights and I thought that affected the way the keyboard appeared. But here’s the plot twist: the view that contains the letters is always of the same size!
This means that the height difference comes from the bottom safe area.
The universal height of the letters view on iPhone is of 216 points in portrait and 162 points in landscape. …