本文整理汇总了C#中MonoTouch.DequeueReusableCell方法的典型用法代码示例。如果您正苦于以下问题:C# MonoTouch.DequeueReusableCell方法的具体用法?C# MonoTouch.DequeueReusableCell怎么用?C# MonoTouch.DequeueReusableCell使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MonoTouch
的用法示例。
在下文中一共展示了MonoTouch.DequeueReusableCell方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetCell
public override MonoTouch.UIKit.UITableViewCell GetCell(MonoTouch.UIKit.UITableView tv)
{
// try and dequeue a cell object to reuse. if one doesn't exist, create a new one
UserGroupCell cell = tv.DequeueReusableCell (cellKey) as UserGroupCell;
if (cell == null) {
cell = new UI.CustomElements.UserGroupCell (usergroup);
}
cell.UpdateCell(usergroup);
return cell;
}
示例2: GetCell
public override MonoTouch.UIKit.UITableViewCell GetCell(MonoTouch.UIKit.UITableView tableView, MonoTouch.Foundation.NSIndexPath indexPath)
{
var cell = tableView.DequeueReusableCell("cell") as UITableViewCell;
if (cell == null)
cell = new UITableViewCell();
cell.TextLabel.Text = _stuff[indexPath.Row];
return cell;
}
示例3: GetCellImpl
protected override MonoTouch.UIKit.UITableViewCell GetCellImpl(MonoTouch.UIKit.UITableView tv)
{
// try and dequeue a cell object to reuse. if one doesn't exist, create a new one
ExhibitorCell cell = tv.DequeueReusableCell (cellKey) as ExhibitorCell;
if (cell == null) {
cell = new UI.CustomElements.ExhibitorCell (exhibitor);
}
cell.UpdateCell(exhibitor);
return cell;
}
示例4: GetCell
public override MonoTouch.UIKit.UITableViewCell GetCell(MonoTouch.UIKit.UITableView tv)
{
var cell = tv.DequeueReusableCell(CellKey);
if (cell == null){
if (_full)
cell = GistDetailViewCell.Create();
else
cell = GistDetailViewCell.CreateNoBottom();
cell.BackgroundView = new CellBackgroundView();
}
cell.SelectionStyle = (Tapped != null) ? UITableViewCellSelectionStyle.Blue : UITableViewCellSelectionStyle.None;
cell.Accessory = (Tapped != null) ? UITableViewCellAccessory.DisclosureIndicator : UITableViewCellAccessory.None;
var gcell = cell as GistDetailViewCell;
if (gcell == null)
return cell;
var str = string.IsNullOrEmpty(_gist.Description) ? "No Description" : _gist.Description;
//We prefer the filename, so lets try and get it if it exists
string filename = null;
if (_gist.Files.Count > 0)
{
var iter = _gist.Files.Keys.GetEnumerator();
iter.MoveNext();
filename = iter.Current;
}
//Set the name (If we have no filename, fall back to the username)
var name = (filename == null) ? (_gist.User == null ? "Unknown" : _gist.User.Login) : filename;
var imageUri = (_gist.User == null) ? null : new Uri(_gist.User.AvatarUrl);
var img = ImageLoader.DefaultRequestImage(imageUri, this);
if (img != null)
Image = img;
if (_full)
gcell.SetInformation(Image, name, _gist.CreatedAt.ToDaysAgo(), str, _gist.Forks.Count, _gist.Comments, 0);
else
gcell.SetInformation(Image, name, _gist.CreatedAt.ToDaysAgo(), str);
return gcell;
}
示例5: GetCell
public override UITableViewCell GetCell(MonoTouch.UIKit.UITableView tableView, MonoTouch.Foundation.NSIndexPath indexPath)
{
var termsinsection = filteredDictionaryItems.FindAll(x => x.StartsWith(filteredSectionList[indexPath.Section]));
string dictionaryItem = termsinsection[indexPath.Row];
string cellID = "CellID";
UITableViewCell cell = tableView.DequeueReusableCell(cellID);
if(cell == null)
{
cell = new UITableViewCell(UITableViewCellStyle.Default, cellID);
cell.Accessory = UITableViewCellAccessory.DisclosureIndicator;
}
cell.TextLabel.Text = dictionaryItem;
return cell;
}