我有这个奇怪的错误,不知道如何修复它。
guard let theDialogObjects = dialogObjects as! [QBChatDialog]
来自“[QBChatDialog]?”的垂头丧气 到 '[QBChatDialog]' 只解开选项;你的意思是使用'!'?
- (void)allDialogsWithPageLimit:(NSUInteger)limit
extendedRequest:(NSDictionary *)extendedRequest
iterationBlock:(void(^)(QBResponse *response, NSArray *dialogObjects, NSSet *dialogsUsersIDs, BOOL *stop))iterationBlock
completion:(void(^)(QBResponse *response))completion {
这就是我在 Swift 中使用它的方式:
QMServicesManager.instance().chatService.allDialogsWithPageLimit(UInt.max, extendedRequest: ["type":String(QBChatDialogType.Private.rawValue)], iterationBlock: { (response, dialogObjects, userIDs, stop) in
guard let theDialogObjects = dialogObjects as! [QBChatDialog]{
return
}