ios - Call storyboard scene without creating a segue in swift? -


i created scene , tried link class scene , create segue storyboard , use self.performseguewithidentifier("segueid", sender: self) , no matter did (i.e. clean build) still got same error "reason: 'receiver () has no segue identifier 'segueid''"

i think best way solve avoid segue in instance together.

so there way make call view in code transition view without using segue in swift?

edit i've tried 3 ways no avail. common way of creating segue between 2 scenes in storyboard , giving name, in case "details", segue isn't recognized.

so tried next way of loading nib , pushing nib onto navigation stack, when compile , build program , click on button present new view controller, nothing happens except function println executing.

and trying use destination controller manually didn't work. instantiateviewcontrollerwithidentifier expects string , complains there many arguments in call

your code doesn't work because need setup segue in storyboards specific id pass argument when call performseguewithidentifier. so, in case, need create segue id "segueid", since string passing call.

if don't want using storyboards, can still use uinavigationcontroller directly (after all, segue uses uinavigationcontroller under hood).

then need instantiate destination view controller manually (e.g. using

self.storyboard.instantiateviewcontrollerwithidentifier(<your vc id storyboard>, animated:true)  

or loading nib

init(nibname:bundle:) 

and push onto navigation stack using

self.navigationcontroller.pushviewcontroller(<the formerly instantiaded vc>) 

Comments

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -