Accessing a Top Navigation Controller from a Subview Navigation Controller

前端 未结 3 1764
再見小時候
再見小時候 2021-02-04 07:26

I have a my views and controllers set up like so.

  1. A Tab/Bar controller
  2. Within 1. is a root view controller
  3. within 2. is a programmatically create
3条回答
  •  借酒劲吻你
    2021-02-04 07:28

    You can use the follow instruccion:

    [(UINavigationController *)self.view.window.rootViewController pushViewController:vc animated:YES];
    

    It works for me :D

提交回复
热议问题