本文整理汇总了C#中NSIndexPath.IndexAtPosition方法的典型用法代码示例。如果您正苦于以下问题:C# NSIndexPath.IndexAtPosition方法的具体用法?C# NSIndexPath.IndexAtPosition怎么用?C# NSIndexPath.IndexAtPosition使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类NSIndexPath
的用法示例。
在下文中一共展示了NSIndexPath.IndexAtPosition方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: RowSelected
public override void RowSelected (UITableView tableView, NSIndexPath indexPath)
{
var row = indexPath.Row;
int n = (int) indexPath.IndexAtPosition(indexPath.Length - 1);
_context.PresentationManager.ShowView (MainMenu.MenuOptions [n].View);
}
示例2: GetCell
public override UITableViewCell GetCell (UITableView tableView, NSIndexPath indexPath)
{
var cell = tableView.DequeueReusableCell (PriceTileTradeAffirmationViewCell.Key) as PriceTileTradeAffirmationViewCell;
if (cell == null)
cell = PriceTileTradeAffirmationViewCell.Create ();
var doneTrade = _tradeTilesModel [(int)indexPath.IndexAtPosition (1)];
cell.UpdateFrom (doneTrade);
return cell;
}
示例3: GetCell
public override UITableViewCell GetCell(UITableView tableView, NSIndexPath indexPath)
{
// For more information on why this is necessary, see the Apple docs
var row = indexPath.Row;
UITableViewCell cell = tableView.DequeueReusableCell(_cellID);
int n = (int) indexPath.IndexAtPosition(indexPath.Length - 1);
if (cell == null)
{
// See the styles demo for different UITableViewCellAccessory
cell = new UITableViewCell(UITableViewCellStyle.Default, _cellID);
cell.Accessory = UITableViewCellAccessory.DisclosureIndicator;
}
string s = "";
s = row + ":" + cell.Subviews.Count();
if (row.Equals(5))
{
UILabel l = new UILabel(new RectangleF(10f, 10f, 200f, 20f));
l.Text = backingList[n].Title;
l.BackgroundColor = UIColor.Red;
//UIView v = new UIView(new RectangleF(10f, 10f, 20f, 20f));
//v.BackgroundColor = UIColor.Green;
cell.Add(l);
}
if (row < 20)
{
cell.TextLabel.Text = backingList[n].Title;
}
//s = s + ":" + cell.Subviews.Count();
//Console.WriteLine(s);
return cell;
}