views:

42

answers:

1

Greetings all -

I am having an issue assigning a value to an existing UIScrollView. In response to an Orientation change, I am re-orienting and sizing the ScrollView and the UIImageViews I have contained within. I can set the UIScrollView's frame:

CGRect wideThumbFrame = CGRectMake(0.0, 530.0, 1024, 190.0); thumbScrollView.frame = wideThumbFrame;

But I can't seem to adjust ONLY the bounds:

[thumbScrollView bounds].size.height = 190.0;

Compiler says "LValue required as left operand of assignment". Is not thumbScrollView my LValue?!?!? What am I missing here?

A: 

You can't do that, since bounds is a property, you have to assign it, to a local variable first, ie

CGRect rect = thumbScrollView.frame;
rect.size.height = 190.0;
thumbScrollView.frame = rect;
Panos