本文整理汇总了C#中UIActivityIndicatorView.SizeToFit方法的典型用法代码示例。如果您正苦于以下问题:C# UIActivityIndicatorView.SizeToFit方法的具体用法?C# UIActivityIndicatorView.SizeToFit怎么用?C# UIActivityIndicatorView.SizeToFit使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UIActivityIndicatorView
的用法示例。
在下文中一共展示了UIActivityIndicatorView.SizeToFit方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ViewDidLoad
public override void ViewDidLoad()
{
base.ViewDidLoad();
// don't allow anything if there isn't a watchUrl set
if ( MediaUrl == null )
{
throw new Exception( "MediaUrl must not be null!" );
}
// setup our activity indicator
ActivityIndicator = new UIActivityIndicatorView();
ActivityIndicator.ActivityIndicatorViewStyle = UIActivityIndicatorViewStyle.White;
ActivityIndicator.SizeToFit( );
ActivityIndicator.StartAnimating( );
PreloadFinished = false;
// create the movie player control
MoviePlayer = new MPMoviePlayerController( );
View.AddSubview( MoviePlayer.View );
View.AddSubview( ActivityIndicator );
ResultView = new UIResultView( View, View.Frame.ToRectF( ), delegate { TryPlayMedia( ); } );
}
示例2: LoadView
/// <summary>
/// Construct the UI
/// </summary>
public override void LoadView()
{
UIWindow appWindow = UIApplication.SharedApplication.Delegate.Window;
float titlebarHeight = 45F;
float appHeight = appWindow.Frame.Size.Height;
float appWidth = appWindow.Frame.Size.Width;
RectangleF frame = new RectangleF (0F, 0F, appWidth, appHeight);
topView = new UIView (frame);
topView.AutoresizingMask = UIViewAutoresizing.FlexibleWidth;
RectangleF barFrame = new RectangleF (0F, 0F, appWidth, titlebarHeight);
titleBar = new UINavigationBar (barFrame);
titleBar.BarStyle = UIBarStyle.Black;
titleBar.AutoresizingMask = UIViewAutoresizing.FlexibleWidth;
RectangleF webviewFrame = new RectangleF (0F, titlebarHeight, appWidth, appHeight - titleBar.Frame.Size.Height);
webView = new UIWebView (webviewFrame);
webView.ScalesPageToFit = true;
RectangleF activityFrame = new RectangleF(appWidth/2 - 12.5f, appHeight/2 -12.5f, 25F, 25F);
activityView = new UIActivityIndicatorView (activityFrame);
activityView.ActivityIndicatorViewStyle = UIActivityIndicatorViewStyle.Gray;
activityView.SizeToFit ();
activityView.AutoresizingMask = UIViewAutoresizing.FlexibleLeftMargin | UIViewAutoresizing.FlexibleRightMargin | UIViewAutoresizing.FlexibleTopMargin | UIViewAutoresizing.FlexibleBottomMargin;
topView.AddSubview (titleBar);
topView.AddSubview (activityView);
topView.AddSubview (webView);
UINavigationItem titleBarItem = new UINavigationItem ("Login");
UIBarButtonItem done = new UIBarButtonItem ("Close", UIBarButtonItemStyle.Done, delegate (object sender, EventArgs e) {
cancelled = true;
CloseView();
});
titleBarItem.SetLeftBarButtonItem (done, true);
titleBar.PushNavigationItem (titleBarItem, true);
this.View = topView;
}
示例3: ViewDidLoad
public override void ViewDidLoad()
{
base.ViewDidLoad();
// setup our table
NotesTableView.BackgroundColor = Rock.Mobile.UI.Util.GetUIColor( ControlStylingConfig.BackgroundColor );
NotesTableView.SeparatorStyle = UITableViewCellSeparatorStyle.None;
ActivityIndicator = new UIActivityIndicatorView( new CGRect( View.Frame.Width / 2, View.Frame.Height / 2, 0, 0 ) );
ActivityIndicator.StartAnimating( );
ActivityIndicator.ActivityIndicatorViewStyle = UIActivityIndicatorViewStyle.White;
ActivityIndicator.SizeToFit( );
ResultView = new UIResultView( View, View.Frame.ToRectF( ), delegate { TrySetupSeries( ); } );
ResultView.Hide( );
}
示例4: ProgressIndicator
UIView ProgressIndicator ()
{
var pind = new UIActivityIndicatorView (new RectangleF (265f, 12f, 40f, 40f)){
ActivityIndicatorViewStyle = UIActivityIndicatorViewStyle.Gray,
AutoresizingMask = UIViewAutoresizing.FlexibleLeftMargin |
UIViewAutoresizing.FlexibleRightMargin |
UIViewAutoresizing.FlexibleTopMargin |
UIViewAutoresizing.FlexibleBottomMargin,
Tag = kViewTag
};
pind.StartAnimating ();
pind.SizeToFit ();
return pind;
}
示例5: ActivityIndicator
static UIView ActivityIndicator (string id)
{
var pind = new UIActivityIndicatorView (new CGRect (265f, 12f, 40f, 40f)){
ActivityIndicatorViewStyle = UIActivityIndicatorViewStyle.Gray,
AutoresizingMask = UIViewAutoresizing.FlexibleLeftMargin |
UIViewAutoresizing.FlexibleRightMargin |
UIViewAutoresizing.FlexibleTopMargin |
UIViewAutoresizing.FlexibleBottomMargin,
Tag = kViewTag,
AccessibilityIdentifier = id,
};
pind.StartAnimating ();
pind.SizeToFit ();
return pind;
}