How to use the Busy Indicator in Xamarin.iOS application
The following section explains how to display the SfBusyIndicator in the Xamarin.iOS.
Step 1: Adding namespace for the added assemblies.
using Syncfusion.SfBusyIndicator.iOS; |
Step 2: Animation types can be defined using the AnimationType API.
busyindicator.AnimationType = SFBusyIndicatorAnimationType.SFBusyIndicatorAnimationTypeBattery; |
Step 3: Title for the SfBusyIndicator can be given using the Title API.
busyindicator.Title =(NSString)"Battery"; |
Step 4: How to use in a page.
public partial class ViewController : UIViewController { public ViewController(IntPtr handle) : base(handle) { }
public override void ViewDidLoad() { base.ViewDidLoad(); SfBusyIndicator busyindicator = new SfBusyIndicator(); busyindicator.AnimationType = SFBusyIndicatorAnimationType.SFBusyIndicatorAnimationTypeBattery; busyindicator.Frame = new CoreGraphics.CGRect(0, 0, UIScreen.MainScreen.Bounds.Width, UIScreen.MainScreen.Bounds.Height); busyindicator.ViewBoxHeight = 100; busyindicator.ViewBoxWidth = 100; busyindicator.Title =(NSString)"Battery"; this.View.Add(busyindicator); }
public override void DidReceiveMemoryWarning() { base.DidReceiveMemoryWarning(); // Release any cached data, images, etc that aren't in use. } } |
Output
Please use this sample link for reference.