I've read this question: How to call Objective-C code from Swift1. But I can found what I need. I'm using swift like first language in my project and later I've add Objective C. But my problem is in Objective c file how I can call a function in swift, now I can do only the contrary (working in swift and using objective c class). When I following code :
#import "ViewController-Swift.h"
xcode issues is that: file not found.
That's my problem now:
@objc class ShareViewController: UIViewController {
var name: String
init(name: String) {
self.name = name
}
// Needed to add a class level initializer
class func newInstanceNamed(name: String) -> ShareViewController {
return ShareViewController(name: name)
}
func abilitaTimer(){
println("ciao")
}
}
}
xcode issues is that: required initializer init coder...