jjzjj

TableViewModel

全部标签

ios - 错误 : Invalid conversion from throwing function of type '(_) throws -> ()' to non-throwing function type '(DataSnapshot) -> Void'

这是我的代码:funcloadData(){ref.child(currentUserID!).observe(.childAdded){(snapshot)inletsnapshotValue=try?snapshot.valueas?[String:AnyObject]ifletitem=tryTableViewModel(id:snapshot.key,likeLabel:self.likeLabel,playLabelString:self.playLabelString,json:snapshotValue){self.items.append(item)}self.tabl