Clean-Swift / CleanStore

A sample iOS app built using the Clean Swift architecture. Clean Swift is Uncle Bob's Clean Architecture applied to iOS and Mac projects. CleanStore demonstrates Clean Swift by implementing the create order use case described by in Uncle Bob's talks.
https://clean-swift.com/clean-swift-ios-architecture/
MIT License
1.91k stars 315 forks source link

Container View Controller Data passing #18

Open 1er4y opened 7 years ago

1er4y commented 7 years ago

Hi Raymond. I use your Clean Swift architecture design in my app. Thats nice, but, i have a issue with data passing.

Passing data on NEXT scene its easy. But. What i should use, to pass data FROM Container View (thats embedded with TableViewController) TO Parent View controller? In another words, what i should use for transfer data from CHILDREN View controller to PARENT view Controller.

I must use router? Or interactor? I don't understand this. How to connect inputs of different view controllers in backward direction?

Thanks for reply.

Saik0s commented 7 years ago

Hi, You can try this modification of Clean Swift.

1er4y commented 7 years ago

@Saik0s Thanks for reply =) I already solve my problem with adding delegate to my parent view controller from container view controller.

BTW, I already changed Clean Swift architecture almost like in your modification =)