当前位置: 首页>>代码示例>>C#>>正文


C# UIActivityIndicatorView.SizeToFit方法代码示例

本文整理汇总了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( ); } );
        }
开发者ID:Higherbound,项目名称:HBMobileApp,代码行数:26,代码来源:NotesWatchUIViewController.cs

示例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;
		}
开发者ID:swizzley,项目名称:fh-dotnet-sdk,代码行数:42,代码来源:FHOAuthViewController.cs

示例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( );
        }
开发者ID:Higherbound,项目名称:HBMobileApp,代码行数:17,代码来源:NotesMainUIViewController.cs

示例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;
	}
开发者ID:BoogieMAN2K,项目名称:monotouch-samples,代码行数:16,代码来源:controls.cs

示例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;
		}
开发者ID:BytesGuy,项目名称:monotouch-samples,代码行数:17,代码来源:ControlsViewController.xib.cs


注:本文中的UIActivityIndicatorView.SizeToFit方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。