Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/118.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/sharepoint/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios 如何在Swift中使用块输入的Objective-C函数_Ios_Swift_Ios8_Objective C Blocks - Fatal编程技术网

Ios 如何在Swift中使用块输入的Objective-C函数

Ios 如何在Swift中使用块输入的Objective-C函数,ios,swift,ios8,objective-c-blocks,Ios,Swift,Ios8,Objective C Blocks,我使用的是Objective-CSDK。我要使用的函数接受一个 委托代理人处理用户同意 - (void) startWithDelegate: (id<SharingDelegate>) delegate; 谁能告诉我如何在Swift中实现此功能?签名是什么?如果它是一种方法(很难说,因为你的显示是乱码的),我认为它应该是这样的: func getUserConsent(consentHandler:Bool -> (), deviceN: String) { //

我使用的是Objective-CSDK。我要使用的函数接受一个 委托代理人处理用户同意

- (void) startWithDelegate: (id<SharingDelegate>) delegate;
谁能告诉我如何在Swift中实现此功能?签名是什么?

如果它是一种方法(很难说,因为你的显示是乱码的),我认为它应该是这样的:

func getUserConsent(consentHandler:Bool -> (), deviceN: String) {
    // body goes here
}

此函数实际上有1个输入,而不是2个。它有2个参数。你真的能准确地显示它吗?不管怎么说,你是从哪里得到这些的?如果你认为你已经知道答案,你为什么要问?不,我不知道答案。sdkapi声明只有1个参数,仅仅因为你的答案不是他们想要的答案就否决他们的问题是不好的。
func getUserConsent(consentHandler:Bool -> (), deviceN: String) {
    // body goes here
}