本文整理汇总了C#中UITableViewCell.ViewWithTag方法的典型用法代码示例。如果您正苦于以下问题:C# UITableViewCell.ViewWithTag方法的具体用法?C# UITableViewCell.ViewWithTag怎么用?C# UITableViewCell.ViewWithTag使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UITableViewCell
的用法示例。
在下文中一共展示了UITableViewCell.ViewWithTag方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: FillCellWithMember
public static UITableViewCell FillCellWithMember(UITableViewCell cell, CodeProjectMember member) {
(cell.ViewWithTag (100) as UILabel).Text = member.Name;
(cell.ViewWithTag (101) as UILabel).Text = "Posts: " + (member.ArticleCount + member.BlogCount);
(cell.ViewWithTag (102) as UILabel).Text = member.Reputation;
CodeProjectDatabase database = new CodeProjectDatabase ();
byte[] gravatar = database.GetGravatar (member.Id);
if (gravatar != null) {
UIImage image = UIImage.LoadFromData (NSData.FromArray (gravatar));
(cell.ViewWithTag (105) as UIImageView).Image = image;
}
return cell;
}
示例2: WillDisplay
public override void WillDisplay(UITableView tableView, UITableViewCell cell, NSIndexPath indexPath)
{
var unratedArgumentIcon = cell.ViewWithTag(5) as UIImageView;
var unratedArgumentLabel = cell.ViewWithTag(10) as UILabel;
unratedArgumentIcon.Alpha = 0;
unratedArgumentLabel.Alpha = 0;
Task.Run(() => {
ProductGroupManager.GetUnratedArgumentsCount(
ProductGroups[indexPath.Row],
UserManager.LoggedInUser().Id,
unratedArgumentsCount =>
InvokeOnMainThread(() =>
{
if ( unratedArgumentsCount > 0 )
{
unratedArgumentLabel.Text = unratedArgumentsCount.ToString();
UIView.BeginAnimations("cellAnimation");
UIView.SetAnimationCurve(UIViewAnimationCurve.EaseInOut);
UIView.SetAnimationDuration(1);
unratedArgumentIcon.Alpha = 1;
unratedArgumentLabel.Alpha = 1;
UIView.CommitAnimations();
}
})
);
});
}
示例3: RefreshCell
public override void RefreshCell(UITableViewCell cell)
{
cell.SelectionStyle = UITableViewCellSelectionStyle.None;
cell.TextLabel.Text = Caption;
TextField.ReturnKeyType = NextElement (typeof(TextFieldElement)) != null ? UIReturnKeyType.Next : UIReturnKeyType.Default;
var v = cell.ViewWithTag (42);
if (v == null) {
cell.ContentView.AddSubview (TextField);
} else {
if (v.Handle != TextField.Handle) {
v.RemoveFromSuperview ();
cell.ContentView.AddSubview (TextField);
}
}
TextField.Frame = new RectangleF (CaptionWidth, 11, 300 - CaptionWidth, 22);
}