Monday, October 23, 2023
HomeiOS Developmentios - Implementing Delegate Strategies in Swift from interface

ios – Implementing Delegate Strategies in Swift from interface


I’m making an attempt to implement delegate strategies within the supply code so it could take heed to modifications that’s uncovered by a library.

I may implement this:

- (void)controllerDidCancel:(ControllerType *_Nonnull)module;

Into this: (and it will get triggered when the motion is carried out)

@objc public func controllerDidCancel(_ controller: ControllerType) {
        // some code
    }

However I simply merely do not perceive how ought to I implement one thing like the next:

- (void)controller:(ControllerType *_Nonnull)moudle1 controllerDidFinish:(ResponseType *_Nullable)module2;

Tried to easily name the second interface like so:

@objc public func controllerDidFinish(_ response: ResponseType) {
            // some code
}

With no luck… it by no means will get triggered.
They each are beneath the identical delegate protocol.

Any options?



Supply hyperlink

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments