async public override void WillDisplay(UITableView tableView, UITableViewCell cell, NSIndexPath indexPath)
		{
			if (cell.RespondsToSelector(new ObjCRuntime.Selector("setSeparatorInset:")))
			{
				cell.SeparatorInset = UIEdgeInsets.Zero;
			}
			if (cell.RespondsToSelector(new ObjCRuntime.Selector("setPreservesSuperviewLayoutMargins:")))
			{
				cell.PreservesSuperviewLayoutMargins = false;
			}
			if (cell.RespondsToSelector(new ObjCRuntime.Selector("setLayoutMargins:")))
			{
				cell.LayoutMargins = UIEdgeInsets.Zero;
			}

			if (Master.TailFetchingEnabled && indexPath.Row == Master.GetTableItemCount() - 1 && !Master.Fetching && Master.GetTableItemCount() > 0 && Master.NextAllowedTailFetch < DateTime.UtcNow)
			{
				UIView FooterLoadingView = new UIView(new CoreGraphics.CGRect(0, 0, UIScreen.MainScreen.Bounds.Size.Width, ((AppDelegate)UIApplication.SharedApplication.Delegate).TabBarController.TabBar.Frame.Size.Height + 60));
				UIActivityIndicatorView ai = new UIActivityIndicatorView(UIActivityIndicatorViewStyle.Gray);
				ai.Frame = new CoreGraphics.CGRect(UIScreen.MainScreen.Bounds.Size.Width / 2 - 15, 15, 30, 30);
				ai.StartAnimating();
				FooterLoadingView.AddSubview(ai);
				tableView.TableFooterView = FooterLoadingView;
				Master.Offset = Master.GetTableItemCount();//Master.Offset + Master.Count;
				await Master.FetchTableData();
			}
		}
示例#2
0
 public override void WillDisplay(UITableView tableView, UITableViewCell cell, NSIndexPath indexPath)
 {
     if (cell.RespondsToSelector(new ObjCRuntime.Selector("setSeparatorInset:")))
     {
         cell.SeparatorInset = UIEdgeInsets.Zero;
     }
     if (cell.RespondsToSelector(new ObjCRuntime.Selector("setLayoutMargins:")))
     {
         cell.LayoutMargins = UIEdgeInsets.Zero;
     }
 }
		public override void WillDisplay (UITableView tableView, UITableViewCell cell, Foundation.NSIndexPath indexPath)
		{
			if (cell.RespondsToSelector (new ObjCRuntime.Selector ("setSeparatorInset:"))) {
				cell.SeparatorInset = UIEdgeInsets.Zero;
			}
			if (cell.RespondsToSelector (new ObjCRuntime.Selector ("setPreservesSuperviewLayoutMargins:"))) {
				cell.PreservesSuperviewLayoutMargins = false;
			}
			if (cell.RespondsToSelector (new ObjCRuntime.Selector ("setLayoutMargins:"))) {
				cell.LayoutMargins = UIEdgeInsets.Zero;
			}
		}
            public override void WillDisplay(UITableView tableView, UITableViewCell cell, NSIndexPath indexPath)
            {
                cell.BackgroundColor = UIColor.Clear;

                if (cell.RespondsToSelector(new ObjCRuntime.Selector("setSeparatorInset:")))
                {
                    var separator = cell.SeparatorInset;
                    separator.Left      = (indexPath.Row < maxCellNum) ? borderMargin : tableView.Bounds.Width;
                    cell.SeparatorInset = separator;
                }

                if (cell.RespondsToSelector(new ObjCRuntime.Selector("setPreservesSuperviewLayoutMargins:")))
                {
                    cell.PreservesSuperviewLayoutMargins = false;
                }

                if (cell.RespondsToSelector(new ObjCRuntime.Selector("setLayoutMargins:")))
                {
                    cell.LayoutMargins = UIEdgeInsets.Zero;
                }
            }
        public void WillDisplay(UITableView tableView, UITableViewCell cell, NSIndexPath indexPath)
        {
            if (tableView.RespondsToSelector(new ObjCRuntime.Selector("SeparatorInset")))
            {
                tableView.SeparatorInset = UIEdgeInsets.Zero;
            }

            if (tableView.RespondsToSelector(new ObjCRuntime.Selector("LayoutMargins")))
            {
                tableView.LayoutMargins = UIEdgeInsets.Zero;
            }

            if (cell.RespondsToSelector(new ObjCRuntime.Selector("LayoutMargins")))
            {
                cell.LayoutMargins = UIEdgeInsets.Zero;
            }
        }
            public override void WillDisplay (UITableView tableView, UITableViewCell cell, NSIndexPath indexPath)
            {
                cell.BackgroundColor = UIColor.Clear;

                if (cell.RespondsToSelector (new ObjCRuntime.Selector ("setSeparatorInset:"))) {
                    var separator = cell.SeparatorInset;
                    separator.Left = (indexPath.Row < maxCellNum) ? borderMargin : tableView.Bounds.Width;
                    cell.SeparatorInset = separator;
                }

                if (cell.RespondsToSelector (new ObjCRuntime.Selector ("setPreservesSuperviewLayoutMargins:"))) {
                    cell.PreservesSuperviewLayoutMargins = false;
                }

                if (cell.RespondsToSelector (new ObjCRuntime.Selector ("setLayoutMargins:"))) {
                    cell.LayoutMargins = UIEdgeInsets.Zero;
                }
            }