I'm developing my first iOS app and I've been trying to adhere for good MVC practices and laid out conventions to make me app easy to maintain and redevelop. I'm making use of a Storyboard and largely I will use Push segues to navigate through my app. Here is a snapshot of my Storyboard.
When Add Staff is clicked, a push segue moves to Select Staff. Once on Select Staff, I select the staff I want and can return to the previous VC. I should mention that each VC has it's own .m
and .h
which I subclassed from UIViewController. Here is what it looks like when used.
Now I've hit a brick wall in transferring the selected data rows back to the first VC. My problem is that I don't know how to best transfer data back to a VC from one which has been pushed by it. In the Select Staff VC, I have an array (currentSelected
) which correctly holds the Strings of the selected rows, but I want to access this array in the Create VC once I have rolled back.
How do I best go about doing this?
P.S. It's worth noting that I realise there are similar questions to this one, but they are either for slightly varying issues, slightly complex or folder older versions of XCode which talk about XIBs and stuff. For the past while I've been researching the literature on the issue and can't make effective headway, so I hope this explains why I made this question.