本文整理汇总了C#中UIView.SetNeedsDisplay方法的典型用法代码示例。如果您正苦于以下问题:C# UIView.SetNeedsDisplay方法的具体用法?C# UIView.SetNeedsDisplay怎么用?C# UIView.SetNeedsDisplay使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UIView
的用法示例。
在下文中一共展示了UIView.SetNeedsDisplay方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Selected
/*
public override void Selected (DialogViewController dvc, UITableView tableView, NSIndexPath path)
{
base.Selected (dvc, tableView, path);
}
*/
public override void Draw (RectangleF bounds, CGContext context, UIView view)
{
UIColor.White.SetFill ();
context.FillRect (bounds);
RectangleF frame = _inviteButton.Frame;
frame.X = view.Frame.Width - frame.Width - 10;
_inviteButton.Frame = frame;
view.Add(_inviteButton);
if (userImage != null)
{
//context.DrawImage(new RectangleF((_height - 35)/2, (_height - 35)/2, 35, 35), userImage.CGImage);
userImage.Draw(new RectangleF((_height - 35)/2, (_height - 35)/2, 35, 35));
}
if (graph.ContainsKey(_User.id))
_User = graph[_User.id];
UIColor.Black.SetColor ();
if (_User.name != null)
{
view.DrawString(_User.name, new RectangleF(50, 5, bounds.Width/2, 10 ), fromFont, UILineBreakMode.TailTruncation);
if (userImage == null)
{
userImage = ImageStore.RequestFullPicture((long)_User.id, (long)_User.id, SizeDB.SizeFacebook, this);
userImage = userImage ?? ImageStore.EmptyProfileImage;
userImage = UIImageUtils.resizeImage(userImage, new SizeF (35, 35));
userImage = GraphicsII.RemoveSharpEdges(userImage);
if (userImage != null)
userImage.Draw(new RectangleF((_height - 35)/2, (_height - 35)/2, 35, 35));
}
}
else
{
ThreadPool.QueueUserWorkItem(o =>
{
GraphUser gUser = AppDelegateIPhone.AIphone.FacebookServ.GetFriend(_User.id);
if (gUser == null)
return;
lock (lock_graph)
{
graph[gUser.id] = gUser;
}
if (gUser.id == _User.id)
{
_User = gUser;
nss.InvokeOnMainThread(()=> view.SetNeedsDisplay());
}
});
}
}