User can pass in extra parameters when opening an url
NorthStar opened this issue · 4 comments
NorthStar commented
An extra parameter could be call back or any data. It looks something like:
- (void)open:(NSString *)url
extraDefaultParams:(NSDictionary *)extraDefaultParams
animated:(BOOL)animated;
Use case:
//.... in a viewController.m
[self updateUserInfo];
[[Routable sharedRouter] open:@"base/settings"
extraDefaultParams:@{@"newTitle": self.userTitle}
animated: YES];
I will try to be more creative in the sample app.
clayallsopp commented
The wording of extraDefaultParams
always confuses me, since...how can defaults be "extra"?
I think extraParams
is less confusing - maybe one of [extraParams, extraParameters, additionalParams, additionalParameters]
has a better ring?
NorthStar commented
True. Extra default sounds super default, when it is meant to say that those parameters get higher priority than default parameters. What do you think it should be called?
clayallsopp commented
open:withExtraParams:animated:
?
NorthStar commented
Cool.