0
我想画一个绿色的方块,用户触摸屏幕,等待1秒,然后解雇盒子。任何想法,为什么这段代码不工作?盒子从不画。如果我使用线程,则动画会清除该框。画一个图像,等待1秒,然后解雇它
public static void DrawClick(RectangleF rect, UIView theView)
{
var center = Center(rect);
center.X = center.X + 30f;
center.Y = center.Y + 30f;
var greenRect = new RectangleF(center, new SizeF(60f, 60f));
var clickView = new UIImageView(greenRect);
clickView.Image = appDelegate.store.GetArt("greenbox.png");
theView.AddSubview(clickView);
//Wait 1 second
System.Threading.Thread.Sleep(1000);
clickView.RemoveFromSuperview();
}
感谢, 里克