Can someone please explain this error: assignment of read-only variable 'prop.1386'
I get it for the last line of this piece of code:
But, if I rewrite it like this I don't get the error and all is fine:
Googling for prop.1386 didn't bring anything useful. I have now code that compiles, but I'd like to know what was wrong with the first version.
I get it for the last line of this piece of code:
Code:
- (BOOL)goingBackwards
{
return (goingBackwardsFlag);
}
...
CATransition *trans = [CATransition animation];
trans.subtype = [self goingBackwards] ? kCATransitionFromLeft : kCATransitionFromRight;
But, if I rewrite it like this I don't get the error and all is fine:
Code:
if ([self goingBackwards])
trans.subtype = kCATransitionFromLeft;
else
trans.subtype = kCATransitionFromRight;
Googling for prop.1386 didn't bring anything useful. I have now code that compiles, but I'd like to know what was wrong with the first version.