Is it "alright" to "chain" delegate?
Object A delegates to Object B which in turns delegate the same method to Object C …
I have a view that needs data from a model connected to it's view controller's parent view controller. Basically there are 2 VCs between the view and the model.
Or is there a better way to do it.
There is no "good" or "bad" patterns.
You should use your common sense to know whether your "chain" delegation makes sense or not.
Will it make future changes easier?
Is the code more independently modularized that way?
Is this chain delegation just bloating the code uselessly?
...there is no "good" or "bad". Some patterns fit better in some situations, some in others ...and usually the most direct way is the best.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With