fix: size alloc issue when UpSideDown in iPhone
This commit is contained in:
@ -93,6 +93,10 @@ namespace Pixiview.iOS.Renderers
|
|||||||
var landscape =
|
var landscape =
|
||||||
lastOrientation == UIDeviceOrientation.LandscapeLeft ||
|
lastOrientation == UIDeviceOrientation.LandscapeLeft ||
|
||||||
lastOrientation == UIDeviceOrientation.LandscapeRight;
|
lastOrientation == UIDeviceOrientation.LandscapeRight;
|
||||||
|
if (UIDevice.CurrentDevice.UserInterfaceIdiom == UIUserInterfaceIdiom.Phone)
|
||||||
|
{
|
||||||
|
landscape |= lastOrientation == UIDeviceOrientation.PortraitUpsideDown;
|
||||||
|
}
|
||||||
page.OnOrientationChanged(landscape);
|
page.OnOrientationChanged(landscape);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -99,8 +99,14 @@ namespace Pixiview.UI
|
|||||||
{
|
{
|
||||||
var m = margin;
|
var m = margin;
|
||||||
var start = element.Margin.Top - m.Top;
|
var start = element.Margin.Top - m.Top;
|
||||||
|
#if DEBUG
|
||||||
|
if (start != 0)
|
||||||
|
{
|
||||||
|
App.DebugPrint($"{element.GetType()}, margin-top from {element.Margin.Top} to {margin.Top}");
|
||||||
|
}
|
||||||
|
#endif
|
||||||
element.Margin = m;
|
element.Margin = m;
|
||||||
if (start != 0 && animate)
|
if (start > 0 && animate)
|
||||||
{
|
{
|
||||||
ViewExtensions.CancelAnimations(element);
|
ViewExtensions.CancelAnimations(element);
|
||||||
element.Animate("margin", top =>
|
element.Animate("margin", top =>
|
||||||
|
Reference in New Issue
Block a user