VIPER-TODO
VIPER-TODO copied to clipboard
VIPER Issues
Sorry to repost here, but figured this would be better than the ObjCIO Github.
Here's a few of things I am having a hard time figuring out using VIPER architecture:
If I have an entity that is just a data structure, and I have a presenter which is responsible for formatting data, why would I not want to pass the entity from interactor to presenter? I find myself unnecessarily creating two separate data structures (one on the interactor/entity side and one on the presenter side) which the interactor does a 1 to 1 mapping on. Is this correct? Also, if you need to modify an entity based off of user interactions, how do you do this without violating layer boundaries and passing some reference to the entity to the presenter and/or view? The only other option seems to be an ugly remapping in the interactor.
How does data get passed from one module to the next? Let's say I have a module that lists categories and a module that lists items in a category. When a user selects a category, that selections needs to be passed from the category module to the item module so that the item module interactor knows which category to retrieve. Data should be owned by the interactors, yet the transition between modules happens at the presenter/wireframe level. It seems I am stuck passing data from one interactor to another through their respective presenters/wireframes which results in a lot of unnecessary code and seems to violate the single responsibility of the presenter only presenting data to a view and a wireframe just transitioning between views. There is also the layer boundary issue again because if you pass enough information for the second interactor to interact with the entity, then you are basically passing the entity... that or you have to do another ugly remapping the in second interactor. Should the interactors in different modules know about each other or communicate via a protocol? What's the best way to pass data between modules?
And what is the proper role of wireframes? Shouldn't they instantiate the entire stack (presenter, interactor, etc.) for their module and wire them up? Seems like this is mostly happening in the AppDependencies class which feels like it will get out of hand quickly. If wireframes own and configure the entire stack, then it feels like this might help a bit in passing information from one interactor to another, but would still violate boundaries or require interactors to communicate.
set your open gesture to none [self.drawerController setOpenDrawerGestureModeMask:MMOpenDrawerGestureModeNone];
and then re set it to MMOpenDrawerGestureModeBezelPanningCenterView when re-enabling menu
Thank you. And how to hide navigation bar icon that opens left menu?
@fustalol take a look please #463
And how to hide navigation bar icon that opens left menu?
yourVCinstance.navigationItem.leftBarButtonItem = nil
please close issue, thxs
Hi,
Did you migrate to swift 3 ?
mm_drawerController.openDrawerGestureModeMask = .None
doesn't work anymore in swift 3
please see #470
how can disable the drawer after completion of left drawer on swift 3
You can use drawerController?.openDrawerGestureModeMask = MMOpenDrawerGestureMode(rawValue: 0)