转到嵌入式视图控制器

Segue-ing to Embedded view controller

我有一个嵌入在 UINavigationController 中的视图控制器,我想转到另一个也嵌入在不同 UINavigationController 中的视图控制器。如果我尝试使用推送 segue,我会收到一条错误消息,提示我无法推送 UINavigationController。但是,我不认为使用模态转场是合适的。我该怎么办?

How should I go about this?

您应该使用单个导航控制器。

the problem is that I want different bar button items for each view controller and they won't change

每个视图控制器都可以根据自己的喜好设置栏按钮。看看UINavigationItem。每个视图控制器都有一个导航项,导航项具有各种属性,例如 leftBarButtonItemsrightBarButtonItems 可用于设置按钮。