How can I manually switch between UIViewControllers in storyboard?

后端 未结 4 2348
你的背包
你的背包 2020-12-01 03:00

All I need is to view a UIView controller in same storyboard file manually with code. I use storyboard to make all forms and connections. My application starts

4条回答
  •  悲&欢浪女
    2020-12-01 03:46

    hello try to use this code

    Storyboard put ID = "xxx * Name Desire" mark use StoryboarID

    UIStoryboard * storyboard = self.storyboard;
    
    DetailViewController * detail = [storyboard instantiateViewControllerWithIdentifier: @ "xxx * Name Desire"];
    
    [self.navigationController pushViewController: detail animated: YES];
    

提交回复
热议问题