In Swift, I see some methods like:
@objc private func doubleTapGestureRecognized(recognizer: UITapGestureRecognizer)
I was wondering, when to use @objc? I read some documents, but they are saying when you want it to be callable in Objective-C, you should add @objc flag
However, this is a private function in Swift, what does the @obj do?
private mean it visible only in Swift. so use @objc to visible in Objective-C. If you have a func to selector a private func in swift, it is required.
The @objc attribute makes your Swift API available in Objective-C and the Objective-C runtime.