More explanations at this post: http://www.lombax.it/?p=321
For details, look inside main.swift
, there are:
2 plain function
a class called TestClass
with 2 instance methods
Before calling the two functions, I call
override()
override_instance_method()
that are declared inside the override.c
file.
These functions replaces the implementation of:
- the plain function
original()
withexchanged()
- the instance method of
TestClass
:original()
withexchanged()
to see in action, simply execute the app.
Comment
//override()
//override_instance_method()
to come back to the original implementation