Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // in firstVC
- -prepareForSegue:sender:
- {
- VC *destination = segue.destination;
- self.flow.setupFlowBlock(destination);
- }
- // in flow
- typedef FlowBlock = ^void (VC *destination);
- @property (copy, nonatomic) setupFlowBlock;
- - (void)showSecondVC:(VM *)sender sender:(id)sender
- {
- [currentVC performSegueWithIdentifier:@"secondVCSegueName" sender:sender]
- self.setupFlowBlock = ^(VC *destination) {
- destination.viewModeller = ({
- SecondVM *secondVM = [SecondVM new];
- secondVM.routing = sender.routing;
- secondVM.dataModel = sender.secondDataModel;
- self.currentVC = destination;
- });
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement