Is bounds.origin ever different from (0,0)?


#1

In Chapter 4, the section “Drawing a single circle” is computed what the center of the bounds rectangle is:

CGPoint center;
center.x = bounds.origin.x + bounds.size.width / 2.0;
center.y = bounds.origin.y + bounds.size.height / 2.0;

If I understand the preceding explanation correctly, bounds has to do with the view itself. I tried some different set ups and checking in the debugger, but I could not get bounds.origin.x of a view anything else than 0 (as opposed to frame.origin.x). This behavior corresponds perfectly with the provided explanation.

Why are bounds.origin.x and bounds.origin.y used? How can its origin ever be different than (0,0)?


#2

See http://forums.bignerdranch.com/viewtopic.php?f=485&t=8177.


#3

Thanks! I wasn’t expecting that in “my golden challenge”, so did not look there. Sorry.