I added the following code to the solve the challange:
This makes stripeColor accessible other objects.
HypnosisViewController.m, - (void)accelerometer:(UIAccelerometer *)meter didAccelerate:(UIAcceleration *)accel
… [hv setYShift:yShift];
float r, g, b;
r = [accel x] / 2 + .5;
g = [accel y] / 2 + .5;
b = [accel z] / 2 + .5;
[[hv stripeColor] release];
[hv stripeColor] = [UIColor colorWithRed:r green:g blue:b alpha:1];
[[hv stripeColor] retain];
// Redraw the view …[/code]
The assignment of the new UIColor causes a build error: LValue required as left operand of assignment.
When I change the code to the dot notation, I can build and run the app with no problems.
I don’t understand why I get the error.