I am new to iPhone programming and I am trying to understand how frame and bounds properties work. In the Interface builder I created UIView where I put UIImageView as a child.
I made UIImageView bigger than parent view. and set 'clip subview' property to true for parent UIView and to false for child UIImageView.
When I change frame.origin property of the child UIImageView programmatically. but when I change 'bounds.origin' property of the parent UIView I see nothing. Probably I wrongly understand the purpose of 'bounds'.
What should I do to get the behaviour described in the iPhone Application programming guide:
You can change the bounds origin without changing the other two properties. When you do, the view displays the portion of the underlying image that you have identified. InFigure2-4 (page 56), the original bounds origin is set to(0.0,0.0). In Figure2-5, that origin is moved to (8.0,24.0).As a result,a different portion of the underlying image is displayed by the view. Because the frame rectangle did not change, however, the new content is displayed in the same location inside the parent view as before.
Thanks in advance. Andrew