A design pattern is a recurring solution that solves a specific design problem
They are helpful for speeding up problem solving, ensuring that a developer doesn't have to reinvent the wheel for every situation
The design pattern is a common way to organize code so that it is reusable and more easily extensible
Model View Controller
Singleton classes are very simple and useful design pattern in iOS
Ensure a single access point
Provides a global point
The class keeps track of its sole instance and ensures that no other instance can be created. Singleton classes are appropriate for situations where it makes sense for a single object to provide access to a global resource
Delegation as a clean and simple way of connecting objects and helping them to communicate with other.
Simply say delegate are Protocols, it sends message to Delegate object when event handled.
One example of this is UIScrollView
The UIScrollView class has no knowledge of what it should be scrolling as that is an application specific task. So to notify the application of scrolling events, UIScrollView uses the UIScrollViewDelegate
The application can implement the delegate and then intercept the scrolling events sent to it by the UIScrollView
You may not be able to access content or other services correctly without cookies. Learn more