So I'm converting this line of code
NSPredicate *predicate = [NSPredicate predicateWithBlock:^BOOL(TidyFeed * _Nonnull item, NSDictionary<NSString *,id> * _Nullable bindings) {
return ![item.feedEntryId isEqualToString:feedEntryId];
}];
to swift code
var predicate = NSPredicate { (item: TidyFeed, bindings: NSDictionary) in
return !(item.feedEntryId == feedEntryId)
}
but I get this error
Cannot convert value of type '(TidyFeed, NSDictionary) -> Bool' to expected argument type '(AnyObject, [String : AnyObject]?) -> Bool'
has anyone encounter this error when using blocks?
Additional Info
Swift code
apiClient.dismissFeed(feedEntryId, completion: {(responseObject: AnyObject, error: NSError) -> Void in
})
Error
Cannot convert value of type '(AnyObject, NSError) -> Void' to expected argument type 'AFAPIOperationCompletionBlock!'
and here's the completion block code of AFAPIOperationCompletionBlock
- (void) completion:(id)responseObject error:(NSError *)error