With the introduction of Swift as an iOS programming language, iOS development is becoming more trendy and affordable. However, use of traditional Objective-C is still in place and with the completion of Swift in all aspects of programming to compete with Objective-C, iOS developers are not in a mood to switch completely on Swift.
Don’t Indulge in MVC Trap
MVC concept is very popular in web development. Fortunately, iOS programming is also adopting it widely and used extensively.
The three layers (Model, View, and Controller separate business logic from UI) allows the designers to do rapid programming on the same project simultaneously.
- model layer consists of data and business logic
- View layer has some objects to build UI (presentation of data)
- controller layer has a significant role in managing interactions between data and UI.
Model and View layers won’t communicate directly with each other and therefore they need the presence of Controller layer in between to work together. To avoid indulge ,create MVC trap with solid app architecture .
One of the most repeated mistakes committed by iOS developers is that they forget to include the dealloc method in each of the class and this can lead to serious memory management concerns. Make sure that you’re including the proper dealloc method in each class in order to avoid issues of this nature.
Avoid ui operations in main thread
Performing operations in main threads leads to some unknown weird bugs to evolve which affects the performance of the app. So it is obvious that developers have to run the programs in separate thread. Among those, NSBlockOperation is useful to define a block of code and NSOperationQueue saves you from blocking main thread operation by simply placing operations in the queue.
Avoid testing in simulator
Usually iOS simulator is fast and reliable and produces desired output but there is a wide range of difference between iOS simulator and real time iPhone.
Gestures like touching and face recognising are very accurate in real time phone than iOS simulators, so use of iOS simulator to be reduced for testing the app