Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public override void ViewDidLoad ()
- {
- // Perform any additional setup after loading the view
- UIButton button = new UIButton (new System.Drawing.RectangleF(100, 100, 100, 30));
- button.SetBackgroundImage ("imageNeeded", UIControlState.Normal);
- var gestureRecognizer = new UILongPressGestureRecognizer ();
- gestureRecognizer.AddTarget(() => this.ButtonLongPressed(gestureRecognizer));
- button.AddGestureRecognizer(gestureRecognizer);
- this.View.Add (button);
- }
- public void ButtonLongPressed(UILongPressGestureRecognizer gestureRecognizer)
- {
- if (gestureRecognizer.State != UIGestureRecognizerState.Began)
- {
- return;
- // Needed because selector is executed twice, because Long-press gestures are continuous
- }
- // Perform action of opening the dialog to select/take a picture, replacing the ? image with the new image
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement