0

I have some weird requirement to swizzle a class method with an instance method.

Basically, they are in different classes A & B. A has a static function called

 public static func aTest() {}

B is a singleton with a function

 static let sharedInstance = B()

And it has a function

 public func bTest() {}

How can I swizzle out aTest() and point to B.sharedInstance.bTest()?

I know it is a very weird request .. but I need this :)

Oliver Hu
  • 148
  • 7

0 Answers0