I have been trying for days to resolve an issue with a bug in my code but I can't figure it out.
This is my first ever iOS app and post on here so go easy on me!
Basically, I have an app that has a 'create' button and a 'load' button. When the 'create' button is pressed, its position moves and a textfield is created for the user to input text. When the 'load' button is pressed, again the position moves but a tableview is created for a user to select previous file names.
If the user presses the 'create' button, fills in the textfield, and again presses 'create', the application segues to the new view perfectly. This is the same when the user presses 'load', selects a file name from the table view and again presses 'load' to segue to the new view. They both segue to the same view and it all works perfectly.
However, if the user clicks the 'create' button (which animates the buttons and creates the textfield), and then clicks away, reverting the view to the original layout, and then decides to load a previous file (which again animates the buttons but this time creates the table view), the new view loads very bizarrely! Instead of animating from the bottom to fill up the screen, it appears halfway over the previous view, moves up slightly and then down to cover the old view.
What is even more bizarre is that the weird loading of the views continues across all views when this bug occurs.
I programmatically trigger the segues, using
[self performSegueWithIdentifier:@"First" sender:sender];
and
[self performSegueWithIdentifier:@"Second" sender:sender];
And I have ensured the segues are labelled correctly.
Does anyone have a similar experience and they have managed to rectify the problem? I did try to upload pictures to show the problem better but I do not have enough points :(
I have uploaded a video to youtube of the bug which should more clearly show the issue: