I'm a bit stumped by the workaround for unwinding a segue here: Xcode 6 Storyboard Unwind Segue with Swift Not Connecting to Exit
The segue is not firing yet I believe I'm implemeting it as outlined in the workaround:
1) The View Controller header:
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
@class DetailViewController;
@interface DetailViewController : UIViewController
- (IBAction) unwindToMaster:(UIStoryboardSegue *) segue;
@end
2) the Controller in Swift:
@objc(DetailViewController)class DetailViewController: UIViewController, UISplitViewControllerDelegate {
@IBOutlet var detailDescriptionLabel: UILabel
var masterPopoverController: UIPopoverController? = nil
@IBOutlet var itemButton: UIBarButtonItem
@IBAction func unwindToMaster(segue:UIStoryboardSegue) {
NSLog("unwind baby")
}
[...]
}
3) The link in the storyboard (as XML):
<barButtonItem key="rightBarButtonItem" title="Item" id="5Nk-ZI-b7r">
<connections>
<segue destination="aIR-Or-dY2" kind="unwind" unwindAction="unwindToMaster:" id="aWo-Uk-qUQ"/>
</connections>
</barButtonItem>
4) How I reset the custom class:
I go to the custom class side page, I delete whatever is in the "Class" text field. It defaults to UIViewController. I save, then I click on the dropdown and select DetailViewController.
The segue is not firing i.e. it is clearly not properly linked to the "item" button but I'm stumped as to what the cause is.
I did implement solutions outlined in the link above and in this link:Workaround for swift unwinding
Of course I may have done it wrong and would appreciate some guidance.