[英]SFBusyIndicator doesn't show up
我正在嘗試在Xamarin IOS c#中使用SFBusyIndicator,但它沒有顯示...
SFBusyIndicator busyindicator = new SFBusyIndicator();
public TesourariaViewController(IntPtr handle) : base(handle)
{
busyindicator.Frame = this.View.Bounds;
busyindicator.AnimationType = SFBusyIndicatorAnimationType.SFBusyIndicatorAnimationTypeGear;
busyindicator.ViewBoxHeight = 200;
busyindicator.ViewBoxWidth = 200;
busyindicator.Title = (NSString)"Loading...";
busyindicator.FontFace = UIFont.SystemFontOfSize(10, UIFontWeight.Thin);
busyindicator.Center = this.View.Center;
this.View.Add(busyindicator);
}
我在ViewDidLoad中有一個按鈕補全事件,我在其中調用busyindicator.IsBusy = true,但是什么也沒發生,忙碌指示器沒有顯示!
猜猜我做錯了什么...或錯過了什么...謝謝
我從未使用過Syncfusion組件,但是從它們的入門頁面上可以看到,與您的組件相比,組件初始化是完全不同的:在UIVIewController中添加視圖存在問題。
嘗試在ViewDidLoad
方法中創建和顯示指標(僅用於測試)
public override void ViewDidLoad ()
{
base.ViewDidLoad ();
SFBusyIndicator busyindicator = new SFBusyIndicator();
this.AddSubview(busyindicator);
busyindicator.AnimationType=SFBusyIndicatorAnimationType.SFBusyIndicatorAnimationTypeBattery;
busyindicator.TextColor=UIColor.RED;
busyindicator.ViewBoxHeight=20;
busyindicator.ViewBoxWidth=20;
busyindicator.IsBusy=True;
}
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.