My Storyboard layout is such that I have MainVC
connected to ModalVC
via a segue that presents it modally.
However, programmatically, at runtime, I instantiate five instances of MainVC
in total.
As a result, all five instances of MainVC
, with the same identifier, are connected to ModalVC
.
I need to change properties in MainVC
after performing some actions in ModalVC
and dismissing it, and there appear to be various ways to do this via segues.
The top answer here is quite detailed and explains the implementation of using an unwind segue but only in the scenario of there being one source view controller: Passing data with unwind segue
My question is: will using a segue, like in that answer, or any other way, work in my situation, with multiple instances of the same MainVC
(same identifier) attached to a single instance of ModalVC
?
Will the unwind segue only transfer data or perform actions in the single MainVC
instance that initiated it? Or will it end up affecting all five MainVC
instances because the MainVC
instances have the same identifiers? If the latter, is there any way around this?