Here's my example, let's say I have a custom UIView
with a tap gesture recognizer that responds to this function:
func handleTap(tap: UITapGestureRecognizer) {
println("Tap!")
}
I generally prefer these to be private, so I mark it as such but it doesn't work. An @objc
or dynamic
specifier is required, like so:
dynamic private func handleTap(tap: UITapGestureRecognizer) {
println("Tap!")
}
This makes me believe that public functions are dynamic by default when added to an objective-c object. Is this the case? Please cite references if found.