I have a view controller configured with a UICollectionView which has a prototype cell defined and working perfectly. I have a segue set up so that if you tap on the prototype cell, it will flip to a "schedule" view for that particular cell. This also works great.
However I now want to add a button to the prototype cell (or a switch) that will use a different segue to go to a different view controller (settings) for whichever cell you tap that button on.
I've created the button, ctrl-clicked and dragged to the View Controller I want to go to, the segue is created and all looks fine. But when I run the app and tap on the button (no matter which cell) it gives the error:
-[UIButton _layoutAttributes]: unrecognized selector sent to instance
I can't figure out what I've done wrong. Is there anything obvious from the above description? I can post code if necessary, but I don't see how it will help in this case as everything is done on the storyboard with regard to the segues etc. There's no code yet on the "Settings" view controller.
The error appears to occur as soon as you tap the button and before prepareForSegue is even called.