4

Hey I am performing a basic segue from a ViewController in one storyboard to another ViewController second storyboard.

1st storyboard : Main

2nd Storyboard : Settings

I have a reference to settings.storyboard in Main.storyboard. below are the screen shot of my setup

Storyboard Ref to Settings in Main

enter image description here

My segue(attributes) to storyboard ref. I am using a custom segue, that slides from right to left :

enter image description here

Destination VC in settings storyboard.

enter image description here

My source VC is a navigation embedded-TableViewController, I perform following operation to segue there:

let storyboard = UIStoryboard(name: "Settings", bundle: nil)
let vc = storyboard.instantiateViewController(withIdentifier: "editprofile") as? EditProfile
performSegue(withIdentifier: "settings", sender: nil)

With the above setting I am still unable to segue to my Destination VC. I have serach stackoverflow alot and even implemented exactly, but am out of Luck. I just dont know where exactly I am going wrong.

Thanks!

Aakash Dave
  • 866
  • 1
  • 15
  • 30

2 Answers2

4

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.

Casey West
  • 578
  • 5
  • 22
0

your storyboard id is case sensitive, make sure whatever you typed in your interface builder as your storyboard id is the same and has the same casing as what you have programmatically typed in your swift file