ios - PushViewController didn't work -
i have simple app, 2 empty page, first 1 have button, call action, code:
let story = uistoryboard.init(name: "main", bundle: nil) let vc = story.instantiateviewcontroller(withidentifier: "testid") self.navigationcontroller?.pushviewcontroller(vc, animated: true)
my second page got id "testid", it's 2 new page, don't change param, or nothing else.
please make sure first view controller has navigation controller embedded it,as pushing view controller require navigation controller'.it surely work then.
Comments
Post a Comment