When to use Delegation, Notification, or Observation in iOS A common problem that we often experience when developing iOS applications, is how to allow communication between our controllers, without the need to have excessive coupling. Three common patterns that appear time and time again throughout iOS applications include: Delegation Notification Center, and Key value observing So why do we need these patterns and when should and shouldn’t they be used? The following discussion of the three patterns are purely from my own experiences of developing iOS applications. I’d like to discuss why I feel a particular pattern is better than another and why I believe certain patterns are better in certain circumstances. The reasons I give are not gospel, and are just my personal opinions. Please feel free to argue and provide me with reasons and experiences you’ve had. What is it about these three patterns? The three patterns chosen are all ways for one object to ...
Technical Solutions for C, C++, Objective-C, C#, OOP's, Data Structure, Algorithms, Mobile Technology, Mobile Design, HTML/HTML5, Web, iOS/iPad/iPhone, Apple Script, Shell Script, Phonegap, AppAccelerator, Unix, Linux, Mac-OS X, Windows, SQL-Server, PL-SQL, Sqlite3, Database Design issues tips, tricks and hacks by Vinay Mishra.