Hi, I am a newbie coder and almost finished my first app but I have run into a snag which I am hoping the Community can help me with. I apologise in advance for this long message.
My app (intended to be used on all models of iOS devices) originally used buttons on each View Controller to navigate between them with each subsequent view presented modally. This worked well for nearly all my simulated devices with the exception of the smaller screen sizes. I had great difficulty fitting in all the necessary elements on each view taking into account the space needed for the buttons. I therefore removed the buttons, embedded my first VC in a Navigation Controller and also added a toolbar with toolbar items linked to “Show” segues between the views.
However, my second VC has user input text fields with global variables which need to be passed to VC9 (the report VC) but since my change in Navigation method this data is no being longer passed.
I suspect this may be due to the “Show” segue rather than the modal method used previously. Alternatively, If I keep the Nav Controller but change the segues to modal presentation I lose the appearance of the Navigation Bar and Toolbar and more importantly the data still doesn’t pass to VC9!
The Segue from my input VC2 has an identifier but I do not see how this is used with Global Variables.
As a test, I added a name text string (mimicking an input from the user) directly into the “name” global variable (before the UIViewController Class) and this does indeed pass to VC9.
The only difference I can find in my code for this data input VC is that the IBAction button is not linked to the “Submit” button itself when using the “Show” segue. Is it possible to have 2 links - one from the button to the code and the other from the button to the next VC creating the “Show” segue?
Any advice or help will be gratefully received!