You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Substantially improve behavior of nested Table & Collection Nodes
This ensures memory cleanup happens correctly and introduces a new test project
to support developing new features while stressing tough use cases for correctness.
ASDisplayNodeAssert(CATransform3DIsIdentity(self.transform), @"-[ASDisplayNode setFrame:] - self.transform must be identity in order to set the frame property. (From Apple's UIView documentation: If the transform property is not the identity transform, the value of this property is undefined and therefore should be ignored.)");
179
179
#endif
180
180
181
-
[self__setSafeFrame:rect];
181
+
if (_flags.synchronous && !_flags.layerBacked) {
182
+
// For classes like ASTableNode, ASCollectionNode, ASScrollNode and similar - make sure UIView gets setFrame:
183
+
_setToViewOnly(frame, rect);
184
+
} else {
185
+
// This is by far the common case / hot path.
186
+
[self__setSafeFrame:rect];
187
+
}
188
+
}
189
+
190
+
/**
191
+
* Sets a new frame to this node by changing its bounds and position. This method can be safely called even if
192
+
* the transform is a non-identity transform, because bounds and position can be set instead of frame.
193
+
* This is NOT called for synchronous nodes (wrapping regular views), which may rely on a [UIView setFrame:] call.
194
+
* A notable example of the latter is UITableView, which won't resize its internal container if only layer bounds are set.
0 commit comments