diff --git a/src/Controls/src/Core/Handlers/Items2/iOS/TemplatedCell2.cs b/src/Controls/src/Core/Handlers/Items2/iOS/TemplatedCell2.cs index 47de131fe94d..5c45d5c312fb 100644 --- a/src/Controls/src/Core/Handlers/Items2/iOS/TemplatedCell2.cs +++ b/src/Controls/src/Core/Handlers/Items2/iOS/TemplatedCell2.cs @@ -124,14 +124,10 @@ public override UICollectionViewLayoutAttributes PreferredLayoutAttributesFittin if (_measureInvalidated || constraintsChanged) { - // Dynamic content invalidations need an inline arrange so the - // updated content is rendered immediately. Constraint changes, - // such as rotation, are deferred to LayoutSubviews when the - // cell has already been arranged so the final native bounds - // are used for the arrange. - shouldArrangeInline = - !constraintsChanged && !_invalidatedDuringArrange; - + // External invalidations need a synchronous arrange even if the outer + // size is unchanged. Arrange-induced invalidations only need another + // inline arrange when measurement produces a different size. + shouldArrangeInline = !_invalidatedDuringArrange || constraintsChanged; _invalidatedDuringArrange = false; // Preserve invalidations raised by Measure or Arrange for the next pass. @@ -184,8 +180,9 @@ public override UICollectionViewLayoutAttributes PreferredLayoutAttributesFittin preferredAttributes.ZIndex = 2; if (_needsArrange && - ((shouldArrangeInline && _hasArrangedSize) || - !_hasArrangedSize)) + (shouldArrangeInline || + !_hasArrangedSize || + !size.ToCGSize().IsCloseTo(_lastArrangedSize))) { ArrangeVirtualView(virtualView, size); } @@ -267,8 +264,7 @@ public override void LayoutSubviews() double.IsPositiveInfinity(_cachedConstraints.Height) ? boundsSize.Height : _cachedConstraints.Height)); if (safeAreaChanged || - needsFinalArrange || - (boundsChanged && measuredConstraintsMatchBounds)) + (boundsChanged && (needsFinalArrange || measuredConstraintsMatchBounds))) { ArrangeVirtualView(virtualView, boundsSize); }