1. 程式人生 > >Multiple methods named 'frame' found with mismatched result, parameter type or attributes

Multiple methods named 'frame' found with mismatched result, parameter type or attributes

我的程式中整合MWPhotoBrowserYYText提示上面的錯誤,在類PSTCollectionView下面。網在這裡插入圖片描述
解決判斷就是把evaluatedObject轉成PSTCollectionViewCell,與網上大部分Array count的問題類似

- (NSArray *)visibleCells {
    return [[_allVisibleViewsDict allValues] filteredArrayUsingPredicate:[NSPredicate predicateWithBlock:^BOOL(id evaluatedObject, NSDictionary *bindings) {
        return [evaluatedObject isKindOfClass:PSTCollectionViewCell.class] && CGRectIntersectsRect(self.bounds,[(PSTCollectionViewCell *)evaluatedObject frame]);
    }]];
}