iOS, programming, method, swizzling, Xcode, swift, apple, developer
Its a technique that substitutes one method implementation for another. Swift optimise code to call direct memory address instead of looking up the method location at runtime as do in Objective C. For enabling swizzling in Swift. We have to disable the optimisation with dynamic keyword. Extend NSObject, better never do this better use dynamic. If you want to swizzled the method in ObjC class use @objc keyword.