RamblerSegues is a collection of custom UIStoryboardSegue subclasses useful in different everyday situations.
- EmbedSegue - present child
UIViewControllers as easy as it should be. - CrossStoryboardSegue - if you're afraid of linked
UIStoryboards - this segue is your perfect choice.
- Add a
UIViewon your parentUIViewController- this view will suit as a container for a child module. Connect it toIBOutletwith nameembedSegueContainer. - Add a segue with class
RamblerEmbedSeguefrom parentUIViewControllerto childUIViewController. Set its identifier toEmbedSegueExample.
- Implement a method
- (UIView*)viewForEmbedIdentifier:(NSString*)embedIdentifierin parentUIViewControllerand returnembedSegueContainerin it:
- (UIView*)viewForEmbedIdentifier:(NSString*)embedIdentifier {
if ([embedIdentifier isEqualToString:@"EmbedSegueExample"]) {
return self.embedSegueContainer;
}
return nil;
}- Enjoy - now you can manage child view controller transitions just like any other - even from
Routerusing ViperMcFlurry.
- Add a new empty
UIViewControlleron the first storyboard. Set its class toRamblerPlaceholderViewControllerand restoration identifier toSecondViewController@AnotherStoryboard.

CrossStoryboardSegueExample and identifier CrossStoryboardSegueExample from parent UIViewController to this placeholder.
3. Add your target view controller to second storyboard - AnotherStoryboard. Set its Storyboard ID to SecondViewController.
4. Enjoy once again - you can use this segue just as usual one, but instead it will open UIViewController from another storyboard:
[self performSegueWithIdentifier:@"CrossStoryboardSegueExample" sender:self];You can test both segues in the example project - clone the repo, and run pod install from the Example directory first.
RamblerSegues is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod "RamblerSegues"RamblerSegues is available under the MIT license. See the LICENSE file for more info.
Andrey Zarembo-Godzyatskiy, andrey.zarembo@gmail.com

