gpt4 book ai didi

ios - 无法将类型 'String.Type' 的值转换为预期的参数类型 'String!'

转载 作者:搜寻专家 更新时间:2023-10-30 22:28:33 24 4
gpt4 key购买 nike

我正在使用用 objective-c 编写的库 MDWamp,它具有以下类型的属性

@property (nonatomic, strong) void (^deferredWampCRASigningBlock)( NSString *challange, void(^finishBLock)(NSString *signature) );

这是swift中的签名

public var deferredWampCRASigningBlock: ((String!, ((String!) -> Void)!) -> Void)!

当我尝试以下列方式快速实例化它时

self.wamp?.config.deferredWampCRASigningBlock?(str : String , { (str2 : String) -> Void in

})

但是我得到了这个错误

Cannot convert value of type 'String.Type' to expected argument type 'String!'

如有任何建议,我们将不胜感激。

最佳答案

这意味着您正在传递数据类型。请传递值。

关于ios - 无法将类型 'String.Type' 的值转换为预期的参数类型 'String!',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33869604/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com