uiviewcontroller - Can you have two Segues from different View Controllers going to one View Controller Swift 3 -
i trying send myslidemenuvc profilevc upon tapping cell. go instantiate profilevc storyboard identifier , have segue view controller loginvc. aloud have 2 segues on 1 view controller? if yes, why wont this segue work, because recieving error: terminating uncaught exception of type nsexception, terminating app due uncaught exception 'nsinvalidargumentexception', reason: 'storyboard () doesn't contain view controller identifier 'profilefromslidemenu''
func tableview(_ tableview: uitableview, didselectrowat indexpath: indexpath) { //self.selectedpost(index: 0) if indexpath.row == 0 { if let myprofilevc = self.storyboard!.instantiateviewcontroller(withidentifier: "profilefromslidemenu") as? profile { self.present(myprofilevc, animated: true, completion: nil) } } if indexpath.row == 1 { handlelogout(any.self) } }
yes, allowed have several segues going different view controllers single view controller.
the problem have either not set identifier particular view controller or have typo in identifier in code.
Comments
Post a Comment