2

So in response to this question: Xcode 6 Storyboard Unwind Segue with Swift Not Connecting to Exit

I'm having the same problem and tried the fix presented, but it still doesn't work. I get the feeling that I'm missing a step for my header file, is it sufficient to simple add a .h file to my project and add the lines mentioned? Or is there more to it?

IndexViewController.h:

@interface IndexViewController (Workaround)
- (IBAction)blaat: (UIStoryboardSegue *)segue;
@end

IndexViewController.swift:

@objc(IndexViewController) class IndexViewController : UITableViewController {
@IBAction func blaat(segue : UIStoryboardSegue) {
    println("Test");
} 
}

Edit1: I do complete step 3, which is to unset and re-set the custom class for the instance of IndexViewController in the StoryBoard

Edit2: Fixed it, the issue was indeed in the header. IndexViewController.h should be:

@class IndexViewController;
@interface IndexViewController : UITableViewController
- (IBAction)unwindToIndexViewController: (UIStoryboardSegue *)segue;
@end
Community
  • 1
  • 1
lordphnx
  • 71
  • 7

2 Answers2

0

You are missing step 3: clear view controller class in IB inspector and set it back.

Kreiri
  • 7,840
  • 5
  • 30
  • 36
0

In Xcode6-Beta 4 this bug has been fixed. I tried it myself in one of my project. Upgrade your xcode and you can forget the workaround.

Fred
  • 421
  • 2
  • 6