ios - How to use Objective-C function with a block input in Swift -
i'm using objective-c sdk. function want use take parameter delegates delegate handling user consent
- (void) startwithdelegate: (id<sharingdelegate>) delegate; the sharingdelegate requires me implement 2 functions, 1 of them has block input
(void) getuserconsent: (void (^)(bool)) consenthandler devicen: (nsstring *) devicen; can tell me how implement function in swift? signature?
if method (hard tell because display of garbled), take it this:
func getuserconsent(consenthandler:bool -> (), devicen: string) { // body goes here }
Comments
Post a Comment