How to get the previous viewcontroller that pushed my current view

后端 未结 10 449
礼貌的吻别
礼貌的吻别 2020-12-28 14:08

The home page of my app has UIButtons, btnIncome and btnExpense. Pressing on this buttons pushes IncomeVC and Expen

10条回答
  •  暖寄归人
    2020-12-28 14:31

    Check out this post: How to identify previous view controller in navigation stack Tony is right, you can get the previous VC from the viewControllers array but at index n-2.

提交回复
热议问题