Segue to Another Storyboard

Segue to another storyboard?

Yes, but you have to do it programmatically:

// Get the storyboard named secondStoryBoard from the main bundle:
UIStoryboard *secondStoryBoard = [UIStoryboard storyboardWithName:@"secondStoryBoard" bundle:nil];

// Load the initial view controller from the storyboard.
// Set this by selecting 'Is Initial View Controller' on the appropriate view controller in the storyboard.
UIViewController *theInitialViewController = [secondStoryBoard instantiateInitialViewController];
//
// **OR**
//
// Load the view controller with the identifier string myTabBar
// Change UIViewController to the appropriate class
UIViewController *theTabBar = (UIViewController *)[secondStoryBoard instantiateViewControllerWithIdentifier:@"myTabBar"];

// Then push the new view controller in the usual way:
[self.navigationController pushViewController:theTabBar animated:YES];

Perform Segue to another storyboard swift

The (withIdentifier: "editprofile") portion of your code seems wrong.

In the images you showed, nothing has the identifier of "editprofile". I would change that to "Settings", as it seems like that is your segue's identifier.

Segue from one storyboard to a different storyboard?

I tried everything I had read but still had no success.
I've managed to get it working using Rob Browns Storyboard Link
It's easy to implement and works really fast

Swift 5 iOS13 - Segue to another Storyboard or unconnected View Controller without creating Card View

If you really like the “old way” just keep using it but add a line setting the modalPresentationStyle of vc to .fullScreen.

Can an 'Unwind Segue' work between two storyboards connected by a storyboard reference?

Starting from your storyboard reference, create a new storyboard reference that will be a reference back to your "Main" storyboard. Make sure you set your Storyboard Identifier on your main as well.

You will now have a "Main Scene" reference with all you Exits now available. You can now create unwind segues as you normally would. Ctrl-drag from your controller to the Exit marker on the Main Scene and you will be able to select the desired exit.

Sample Image

How to segue to a specific viewcontroller in a different storyboard?

In Swift 3,

var storyboard: UIStoryboard = UIStoryboard(name: "Another", bundle: nil)
var vc = storyboard.instantiateViewControllerWithIdentifier("NextViewController") as AnotherViewController
self.show(vc, sender: self)

Segue to another storyboard via interface builder

Earlier it was not possible without code, but since Xcode 7, Apple has given us a powerful tool - Storyboard References.

What you need to do is to drag and drop this element to your initiating storyboard:

storyboard reference

In its options you select the proper storyboard and optionally (default it uses initial view controller) set its id.

storyboard reference options

Now you can define segue to this view controller as normal.

Please note that only normal segues work with iOS8. Relationship ones (like root, embed etc.) work only in iOS9.



Related Topics



Leave a reply



Submit