I am very new to ios development; rather, I just started work on my first application. Now my application has a home button on almost every page, and behind this button the same code fragment is called up as to go to the main screen. This is a lot of duplicate code on every controller that has a home button. And this is just an example. There are many other scenarios like this, and the programmer is still learning how to code, I think its a bad practice, since any changes must be made separately on each controller.
So my question is, what are the best practices in scripts like this when ios coding?
source
share