Proxy Object with Swift

I am trying to implement a proxy template using swift to create a configuration object for my custom object inherited from NSObject. This would be like UIAppearance for UIView. But I don’t understand how to redirect method calls, which I would do in objective-c with the method forwardInvocation:and NSInvocation class,

If someone has encountered such a problem and you have a solution, I would be grateful for that. Thanks in advance.

+4
source share

Source: https://habr.com/ru/post/1625841/


All Articles