I’m implementing a card game.
In this game I have a Board that is an UIView and he holds Cards that are also UIView objects that contains images etc…
My question is what is the best way to receive events in the UIViewController from the inner Card views?
Should I use the NSNotificationCenter and register to a general “cardSelected” event?
or should I use delegates somehow and have the UIViewController listen to a delegate from the board (and the board listen to to a delegate from the cards etc…)
Thanks,
Netanel
I would say using the NSNotificationCenter is cleaner solution simply for the fact you don’t have to keep passing the delegate through all the classes. Thats just personal preference, either approach would work fine.