Changing viewController on Button Click

后端 未结 5 1983
不思量自难忘°
不思量自难忘° 2020-12-20 02:05

I am new to iPhone programming. what I am trying is I have one screen with a button. And I want to change the view controller not only the view when I click that button (I k

5条回答
  •  没有蜡笔的小新
    2020-12-20 02:46

    UINavigationController is what you need. It manages a stack of UIViewControllers and if you want to add new UIViewController just push it into this navigation stack. It automates back button behavior for you, and you can pop your current UIViewController from stack whenever you are done with it.

提交回复
热议问题