On iOS, if we change a view’s frame, we change its bounds, and if we change its bounds, we change its frame.
But we can change the internal coordinate system of a view by:
CGRect b = v.bounds; // v is the UIView object
b.origin.x = 10000;
b.origin.y = 10000;
v.bounds = b;
and now, the top left point of the view is a coordinate of (10000, 10000). Is this also possible by merely changing frame and center but not bounds?
That’s half true. Only the sizes of those two rects are bound together. From the docs:
That doesn’t mention the origins. So your example will modify the internal coordinate system’s origin without changing its position in the superview’s coordinate system. You can’t achieve that behavior via the
frameorcenterproperties; they only affect the the view’s position in its superview’s coordinate system.