CGAffineTransform does not effect autolayout

Azerue

recently I have been working with CGAffineTransform and CATransform3D on views and layers. When I apply transformation at layer level and especially on view level, shouldn't autolayout updates the frames of related views. For example, consider following layout |H:[ViewA]-[ViewB]|. If I apply transformation on just ViewA.

//We can either
    ViewA.transform = CGAffineTransformMakeScale(1.5, 1.5) 
    ViewA.layer.transform = CATransform3DMakeScale(1.5, 1.5, 1.0)

shouldn't ViewB auto adjust it rect since ViewA height, width or position has changed after transformation. I also tried calling

self.view.layoutIfNeeded()
Krumelur

Transformations don't affect the Frame or Bounds of a view or the frame will be in an undefined state. To illustrate that: image you have a rectangular view with a frame of X:10, Y:10, W:100, H:100 and you rotate that by 45 degrees...what should the frame be?

From Apple's docs about the transformation:

If this property is not the identity transform, the value of the frame property is undefined and therefore should be ignored.

This explains why AutoLayout does not perform any updates.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Autolayout and CGAffineTransform

From Dev

AutoLayout CGAffineTransform iOS7 iOS8

From Dev

UIScrollview + AutoLayout + Scroll with Drag Effect

From Dev

UnsafePointer<CGAffineTransform> from CGAffineTransform

From Dev

Autolayout on custom UIButton does not work on some devices

From Dev

Autolayout animate constraint does not animate subviews

From Dev

Why does autolayout have issues with this layout

From Dev

Why does Autolayout not produce consistent results?

From Dev

Autolayout animate constraint does not animate subviews

From Dev

Autolayout on custom UIButton does not work on some devices

From Dev

Why does autolayout have issues with this layout

From Dev

Why does Autolayout not produce consistent results?

From Dev

AutoLayout does not work properly on ios 8.3

From Dev

Is there an animation that does a pulsating effect?

From Dev

Is there an animation that does a pulsating effect?

From Dev

What does the `effect` mean in `scalaz-effect`

From Dev

Does memory effect preformance or lot of if conditions effect?

From Dev

Interpolating CGAffineTransform

From Dev

CGAffineTransform: How to calculate multiply CGAffineTransform?

From Dev

particle effect does not appear in libgdx?

From Dev

When does WindowStartupLocation take effect

From Dev

Ripple effect does not work in RelativeLayout

From Dev

Does deprecation effect the runtime of the application?

From Dev

Does joins in Tableau effect performance?

From Dev

does const has an effect in runtime

From Dev

Change on laravel collection does not effect

From Dev

What phase does stopPropagation effect?

From Dev

how does ! effect sort in vim

From Dev

Does deprecation effect the runtime of the application?

Related Related

HotTag

Archive