2023-04-20

Present view controller modally from two source controllers, with navigation bar

I'm searching for what I believe must be the simple solution to showing (modal) the same destination view controller (an edit screen - with navigation controller and nav bar) from two source view controllers: 1) the root list, and 2) the view item screen.

Here's the sort of thing I mean:

Storyboard

My understanding is that the relationship segue between nav controller and destination VC can only be connected to one source VC? Every time I fixed one, the other broke.

All my attempt to implement prepare for segue generated fatal init coder errors.

Removing the navigation controller and implementing two @IBSegueAction func's got the segues working but removed the required navigation bar (and its save, cancel buttons).

I'm sure I'm missing something simple to elegantly create this workflow. But I can't find it.

I'm using Xcode 14.3 and building in UIKit.



No comments:

Post a Comment