@@ -233,7 +233,6 @@ internal static void PlatformArrangeHandler(this IViewHandler viewHandler, Rect
233
233
return ;
234
234
235
235
var centerX = rect . Center . X ;
236
- var destinationWidth = rect . Width ;
237
236
238
237
var parent = platformView . Superview ;
239
238
if ( parent ? . EffectiveUserInterfaceLayoutDirection == UIUserInterfaceLayoutDirection . RightToLeft )
@@ -246,17 +245,13 @@ internal static void PlatformArrangeHandler(this IViewHandler viewHandler, Rect
246
245
var distanceFromParentCenter = parentCenter - centerX ;
247
246
248
247
// Mirror the center to the other side of the center of the parent
249
- centerX = centerX + ( distanceFromParentCenter * 2 ) ;
248
+ centerX += ( distanceFromParentCenter * 2 ) ;
250
249
}
251
250
252
251
// We set Center and Bounds rather than Frame because Frame is undefined if the CALayer's transform is
253
252
// anything other than the identity (https://developer.apple.com/documentation/uikit/uiview/1622459-transform)
254
253
platformView . Center = new CGPoint ( centerX , rect . Center . Y ) ;
255
-
256
- // The position of Bounds is usually (0,0), but in some cases (e.g., UIScrollView) it's the content offset.
257
- // So just leave it whatever value iOS thinks it should be (adjusted for RTL if appropriate)
258
- var leftEdge = centerX - ( destinationWidth / 2 ) ;
259
- platformView . Bounds = new CGRect ( leftEdge , platformView . Bounds . Y , destinationWidth , rect . Height ) ;
254
+ platformView . Bounds = new CGRect ( platformView . Bounds . X , platformView . Bounds . Y , rect . Width , rect . Height ) ;
260
255
261
256
viewHandler . Invoke ( nameof ( IView . Frame ) , rect ) ;
262
257
}
@@ -316,4 +311,4 @@ static partial void ProcessAutoPackage(IElement element)
316
311
}
317
312
}
318
313
}
319
- #endif
314
+ #endif
0 commit comments