swizzling
How to implement method swizzling swift 3.0?
First of all dispatch_once_t is unavailable in Swift 3.0. You can choose from two alternatives: Global variable Static property of struct, enum or class For more details, see that Whither dispatch_once in Swift 3 For different purposes you must use different implementation of swizzling Swizzling CocoaTouch class, for example UIViewController; Swizzling custom Swift class; Swizzling … Read more