During my career as an iOS developer I wrote around 50 apps. Some of them were small and stayed in the stores just for several months, others stayed alive and got regular updates for years. I’m not a designer myself, I get designs from my clients or a third-party designer. And almost all designs I saw included custom back button on most screens.
Using iOS storyboards to develop UIs, I tried to find an easy way for the user to return to a previous screen, some kind of backward segue. …
Showing even simple pop-up dialogs requires several lines of code in Swift. When you have data validation or proper error handling, you have tens or even hundreds of places where you can show a pop-up. Let’s write several
UIViewController extensions that’ll do the work for us.
self.show(message: "Let's start!")
The first two extensions will show simple pop-ups with only one button. The difference will be only in the title. You can add some styling, but Apple doesn’t usually motivate developers to customise pop-up windows, so I’ll use the basic
As you can see, the title is predefined and can’t be changed, but it can be translated depending on the system locale. If you have files with localisations, you can do it this…
When you write mobile apps in Swift, you usually have a lot of background work. I’ve been working as a mobile developer for almost 10 years and I can hardly remember a single project without Internet requests. Each Internet request requires time to be processed. Usually an unknown amount of time, possibly, endless.
If you do such work in the main or UI (which is the same) thread, your UI will get stuck. …