I’m trying to refactor one of my ViewControllers, by splitting it up.
This is for an app which will do card manipulations. I had a controller which could edit multiple types of shuffles but now I’m splitting it into separate controllers for each individual shuffle type.
There is another story board which allows you to pick moves, it is set up to have segues from hidden buttons. The segues point to storyboard references. Originally I made the scenes for the segues in the dispatch story board, and then refactored them using Xcode’s Editor>Refactor to Storyboard menu item.
I then made a new storyboard for the FaroEditor view controller. Then I tried to figure out how to add a reference to this storyboard. I finally found the ‘Storyboard reference’ in the object gallery.
I put this in the dispatch storyboard, and set it to point to the FaroEditor storyboard:
I did a bit of photoshopping to put the storyboard, the storyboard reference attributes, and the segue attributes in a single image.
When I run and trigger the segue, I get an exception thrown with no info as to what it is:
Again, I used photoshop to copy and paste the three top stack frames into a single image.
I’m at a bit of a loss about how to diagnose and fix this. Any ideas?
2
Answers
You need to add a ‘storyboard ID’ on the view you are referencing and then add that same ID to the Referenced ID in the Attributes Inspector
UI operations should be done in main thread
developer.apple.com/documentation/uikit