1
我有這個奇怪的錯誤,並沒有任何想法熱點解決它。僅從解包可選項中降低;你的意思是使用'!'嗎?
guard let theDialogObjects = dialogObjects as! [QBChatDialog]
低迷現狀從'[QBChatDialog]?到'[QBChatDialog]'僅解開 optionals;你的意思是使用'!'嗎?
- (void)allDialogsWithPageLimit:(NSUInteger)limit
extendedRequest:(NSDictionary *)extendedRequest
iterationBlock:(void(^)(QBResponse *response, NSArray *dialogObjects, NSSet *dialogsUsersIDs, BOOL *stop))iterationBlock
completion:(void(^)(QBResponse *response))completion {
這是我如何使用它在斯威夫特:
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
}
什麼t ype是dialogObjects? –
只需通過替換'!'來嘗試''' – Jan
@EvdzhanMustafa dialogObject是NSArray) –