Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
你好,
我是 iPhone 新手。我创建了两个单独的应用程序。我现在要做的是将两个应用程序集成为一个。例如,我可以显示两个按钮,单击第一个按钮将用户带到第一个应用程序,而单击第二个按钮将用户带到第二个应用程序。
我应该如何处理这个?
先感谢您。
一个简单而通用的方法来做你所要求的是创建两个独立的 RootViewcontrollers 并管理它们在新应用程序的 AppDelegate 中的外观presentModalViewController:animated:。每个控制器都应封装单个应用程序之前所做的事情,作为其在 appDelegate 上的行为(因此,如果一个应用程序从多个类访问其 appDelegate,您可能需要将其声明为全局可访问的)。另一种方法是使用将包装两个 RootViewControllers 的 UITabBarController。
presentModalViewController:animated: