Relevant code in implementation file:
"theCell" appears to be nil. When I set a breakpoint to evaluate "cell" I get multiple error messages that say "'frame' has unknown return type; cast the call to its declared return type"
After looking at this page on Stack Overflow, I believe the solution is to use the collection view's layoutAttributesForItemAtIndexPath: method.
Code:
-(UICollectionViewCell *)visibleCellWhoseFrameContainsPoint:(CGPoint)point
{
UICollectionViewCell *theCell;
for (UICollectionViewCell *cell in [self visibleCells])
{
if (CGRectContainsPoint([cell frame], point)) {
theCell = cell;
break;
}
}
return theCell;
}
"theCell" appears to be nil. When I set a breakpoint to evaluate "cell" I get multiple error messages that say "'frame' has unknown return type; cast the call to its declared return type"
After looking at this page on Stack Overflow, I believe the solution is to use the collection view's layoutAttributesForItemAtIndexPath: method.