public void EnableButton(Player player) { string playerName = string.Format("{0} {1}", player.first_name, player.last_name); GuessButton.Alpha = 1f; GuessButton.BackgroundColor = UIColor.FromDisplayP3(34f / 255.0f, 139f / 255.0f, 34f / 255.0f, 1.0f); // Not an obnoxious green. GuessButton.UserInteractionEnabled = true; NameLabel.Text = playerName; }
private UIImage imageWithColor(UIColor imgColor) { var imgRenderer = new UIGraphicsImageRenderer(new CGSize(1, 1)); var img = imgRenderer.CreateImage((UIGraphicsImageRendererContext ctxt) => { var superRed = UIColor.FromDisplayP3(1.358f, -0.074f, -0.012f, 1.0f); superRed.SetFill(); UIColor.Black.SetStroke(); var path = new UIBezierPath(); path.MoveTo(new CGPoint(10, 10)); path.AddLineTo(new CGPoint(90, 10)); path.AddLineTo(new CGPoint(45, 90)); path.ClosePath(); path.Stroke(); path.Fill(); }); return(img); }