Prevent scrollview from layout out while scrolling
This commit is contained in:
Родитель
c765392c72
Коммит
8b91a3a421
|
@ -1,4 +1,5 @@
|
|||
using System;
|
||||
using CoreGraphics;
|
||||
using Microsoft.Maui;
|
||||
using Microsoft.Maui.Graphics;
|
||||
using UIKit;
|
||||
|
@ -7,10 +8,13 @@ namespace Comet.iOS
|
|||
public class CUIScrollView : UIScrollView
|
||||
{
|
||||
internal Action<Rectangle> CrossPlatformArrange { get; set; }
|
||||
CGRect rect;
|
||||
public override void LayoutSubviews()
|
||||
{
|
||||
base.LayoutSubviews();
|
||||
|
||||
if (rect == Frame)
|
||||
return;
|
||||
rect = Frame;
|
||||
var bounds = Frame.ToRectangle();
|
||||
CrossPlatformArrange?.Invoke(bounds);
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче