O'Reilly logo

Swift Functional Programming - Second Edition by Dr. Fatih Nayebi

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Dynamic binding

Associating a method call to the code to be executed is called binding. As opposed to static binding, where the code associated with the method call is bound during the compile time, dynamic binding means that the code associated with a given method call is not known and will be determined during runtime.

Dynamic binding is associated with polymorphism and inheritance because a method call associated with a polymorphic reference may depend on the dynamic type of that reference.

For instance, our view's static type is UIView, and its dynamic type may be UILabel, UITextField, or UIButton. Let's suppose that some of the methods in UIView are overridden for UIButton. When we call those methods, runtime will dynamically bind the ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required