简体   繁体   English

无法将类型“[UserModel]”的值转换为预期的参数类型“[AnyHashable: Any]?”

[英]Cannot convert value of type '[UserModel]' to expected argument type '[AnyHashable : Any]?'

在此处输入图像描述

i am getting this error when trying to pass model in userInfo params尝试在 userInfo 参数中传递 model 时出现此错误

It's a dictionary, you need a key.这是一本字典,你需要一把钥匙。 You can then pull it out on the receiver by key, or pull the first item from the dictionary.然后,您可以通过按键将其拉出接收器,或从字典中拉出第一项。

userInfo: ["model":self.userModel]

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 无法转换“ UIImage”类型的值? 到预期的参数类型“ [Any]” - Cannot convert value of type 'UIImage?' to expected argument type '[Any]' 无法将“String”类型的值转换为预期的参数类型“[Any]” - Cannot convert value of type 'String' to expected argument type '[Any]' 无法转换类型[[String:Any]? 到预期的参数类型“ _?” - Cannot convert value of type '[String:Any]?' to expected argument type '_?' 无法将类型“ [String:Any]”的值转换为预期的参数类型“ String” - Cannot convert value of type '[String : Any]' to expected argument type 'String' 无法将类型“x”的值转换为预期的参数类型“[String: Any]” - Cannot convert value of type 'x' to expected argument type '[String : Any]' 无法转换期望参数类型GTLServiceCompletionHandler的值 - Cannot convert value of expected argument type GTLServiceCompletionHandler 无法将类型'()'的值转换为预期的参数'()-> void' - cannot convert value of type '()' to expected argument '() -> void' 无法将类型“ [String:Any]”的值转换为预期的参数类型“ [NSAttributedStringKey:Any]” - Cannot convert value of type '[String : Any]' to expected argument type '[NSAttributedStringKey : Any]' 无法将类型的值转换为预期的参数Firebase - Cannot convert value of type to expected argument Firebase 无法将 [Type] 类型的值转换为预期的参数类型“some View” - Cannot convert value of type [Type] to expected argument type 'some View'
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM