You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For those of us new to Objective-C I think having the bridge on app delegate and then having to do setDelegate in that line in the implementation causes some confusion, semantically speaking.
Does this make any sense to you?
The text was updated successfully, but these errors were encountered:
@idibidiart: Yes, this makes sense, and is how I originally did it. However, I avoided this because here the coordinator has to specifically know which ViewController will be using it. You need to explicitly import the .h file, this couples these 2 classes together and can make things harder to change.
The delegate pattern allows any class to be able to use it as long as it implements the proper delegate methods. This keep things cleaner albeit perhaps a bit more confusing to those new to this pattern.
However, I do think that sometimes a coordinator perhaps should be coupled to a specific ViewController. I think it depends on your use case.
The use of the delegate pattern was a little confusing to me, so I ended up doing this:
And in ViewController.m
For those of us new to Objective-C I think having the bridge on app delegate and then having to do setDelegate in that line in the implementation causes some confusion, semantically speaking.
Does this make any sense to you?
The text was updated successfully, but these errors were encountered: