-
Notifications
You must be signed in to change notification settings - Fork 17
Add query system to transmit objects #4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
ABRouter/ABRouter.h
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please change the method signature to (and change query):
- (void)navigateTo:(NSString*)route navigationController:(UINavigationController*)navController parameters:(NSDictionary*)parameters;
|
I like where you're going with this, but I'm not a fan of requiring users to change their entire view controller hierarchy. I'd much prefer to give users the option of using a params object (as you're doing here), but make it optional instead. What I'd imagine this could look like is that the I think it's great to offer a stub implementation of the |
|
I see what you mean and you're right but I don't like the idea of declare all the time the apiPath variable. If there is another way to avoid ABViewController inheritance and apiPath declaration in all controllers it would be great, don't you think ? |
|
That would be ideal. However, I don't think it's possible. In terms of gaining the greatest benefit with the least pain, I think that the |
I've changed main structure by creating a custom UIViewController : ABViewController. All controllers have to inherit from this new class. Then you have to fill an NSDictionary of your object you want to transmit and set it to query variable of your class (done automatically with you navigation method call).
Hope you'll enjoy it :)