Access modal view controller parent

后端 未结 6 1207
傲寒
傲寒 2021-02-01 04:05

I\'m presenting a ViewController modally. How can I access the parent view controller ?

My architecture is TabBarController=>VC1=>VC2=>VC3=>MVC1, and I want to reach VC3

6条回答
  •  鱼传尺愫
    2021-02-01 04:45

    You can always go further back just by calling parentViewController like so:

    self.parentViewController.parentViewController .... and so on until you reach the right one.

提交回复
热议问题