1- Loading Indicator While Fetching Data:
Almost in any application the user needs to wait for data fetching. Let us suppose that you have a simple login screen where the users fills his credentials and press on the login button so you have to call a certain API and wait for the data to get back to you..
The worst thing you can do in this case is not displaying any indicator for the user that a certain operation is occurring right now. Before you even do anything you already gave a bad impression to the user.
A lot of developers will use an indicator that will cover half of the screen and block the UI like this :
That is not wrong , but my personal approach is using a lighter way as below:
It is up to you which indicator you use the important thing is for it to be user friendly , and to use it whenever needed.
Although you can write a complete application without any animation , it is so important to add some to make your application go to the next level and give the user a better experience.
We will not dive into animations of course because that is a huge topic to cover in an article , but I will give you a small example from medium application:
Notice how when the user attempt to click on an item in the collection view , a simple yet very nice animation appears.
To Achieve a similar animation you can simply add the below code to your controller:
3- Watch Out For Memory Leaks:
Memory leaks are dangerous in you app because they will affect your app’s performance and might lead to crashes when the app runs out of memory.
For a good user experience and application performance you need to do a good job when it comes to dealing with memory management.
Automatic Reference Counter (ARC) does a great job automatically for you , but you need to be aware about 3 commons case that may lead to leaks , check out my article were we talk about memory management by examples.
4- Never Block the Main Thread:
Whenever you need to perform any heavy computation in your application you must not do it on the main thread which should be kept for updating UI only. In that way your application will run in a smooth asynchronous manner.
To learn more about Multi Threading in Swift check out my article:
Swift Multi-Threading using GCD For Beginners.
In almost any application you need to get data from an online server , and most likely download images to display to the user.
Having the user wait every time to fetch the same image or data he previously downloaded is a very bad experience.
You as a developer have the decision to cache whatever data you find a necessity to do so , but at least you should cache image downloading and that can be easily done using third party framework like SDWebImage or KingFisher.
Even if you had an incredible functionality in your application , if you did not express that to the user in a beautiful design you will have a bad review for your app and users might stop using it.
Replicating the design can be tricky , you often might have pixelated images , or few pixels shifted from the original design without noticing.
Even some colors you might thought you have them the same but sadly you didn’t. You need to spend more time on checking those aspects.
As an iOS developer I cannot be more thankful to Flawless App for the amazing tool that helped me to compare the expected design and the real app right inside iOS Simulator. Ever since I have been using it I was able to be confident that I replicated the design exactly as intended by the designer.