When trying to connect a Navigation Bar Button to the Exit item of a ViewController in Xcode 6 (not really sure if it's an Xcode 6 problem but worth mentioning as it is in beta) it does not find the Swift function in the custom class.
The function it should be finding:
@IBAction func unwindToList(segue: UIStoryboardSegue) {
}
I made another button on the view just to make sure I could get an IBAction working with Swift and that I was writing it correctly. This works fine:
@IBAction func test(sender: AnyObject) {
NSLog("Test")
}
I have seen this question that seems like the same issue but according to the answers there this should be working.
Xcode 6 is in beta and, of course, Swift is very new, but wanted to see if anyone has come across this before considering it a potential bug.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…