1
私はこの奇妙なエラーがあり、それを修正するための熱い考えがありません。ダウンキャストはアンラップオプションのみからのものです。あなたは '!'を使うつもりでしたか?
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 {
これは、私はスウィフトにそれを使用する方法です:
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です) –