I needed to check that the frame of my view is equal to the given CGRect. I tried to do it like this:
CGRect rect = CGRectMake(20, 20, 20, 20); if (self.view.frame == rect) {
However, I received the error message Invalid operands to binary expression('CGRect' (aka 'struct CGRect') and 'CGRect') . Why can't I just compare two CGRect s?
comparison ios objective-c cocoa-touch cgrect
Tim Vermeulen Oct 13 '12 at 22:12 2012-10-13 22:12
source share