objective c - Behaviour of CGAffineTransformMakeScale with CGREct and with UIView -


I have a view with defined frame (0,0,320,480).
I call the change on this view:

/ P>

  self.myView.transform = CGAffineTransformMakeScale (factor, factor);   

After my change, the scene and screen will be on the scale of maintaining a central position (for example, 34, -8,251,376), as you can see that X and Y Now different from 0

If I use the same function on a CGRC with frame (0,0,320,480):

  CGFFEINE transformer T = CGFEN Transformmaskel (factor, factor); CGRect rect2 = CGRectApplyAffineTransform (rect, t);   

rect2 will preserve 0 for X and Y and I will achieve something like result (0,0,251,376)

Why X and Y rect2 can not change UIView as example?

It is true that you do not see a UIView frame property after technically change It is believed, but it is not technically relevant as per the question you are asking.

When Caffeine Transforms is implemented in UVUV, the change takes into consideration the entrance property of the UVUE's Backing Calair. From Docs on anchorage:

Default (0.5, 0.5), center of the border rectangle.

This means that when you apply it to that scale, consequently, it uses the center of view as an anchor point, so the approach around that place Looking at, I'm guessing that if you want to set the anchor point (0, 0), it will behave like a CGRact.

The CGRact, on the other hand, is a simple straight, and not a backing layer or an anchor point.

Comments