Is there a way to add the mouse event to an Action in Interface Builder?
Currently in my ViewController.h I have this:
- (IBAction)myStepperAction:(id)sender;
In my ViewController.m I have this:
- (IBAction)myStepperAction:(id)sender { }
In my event handler I have the following: (I'm using C# but I can read some Swift)
partial void myStepperAction(Foundation.NSObject sender) {
var stepper = sender as NSStepper;
}
If I add a second argument I get an error:
partial void myStepperAction(Foundation.NSObject sender, Event event) {
var stepper = sender as NSStepper;
var value = event.CTRLKey==true ? stepper.DoubleValue + 10 : stepper.DoubleValue;
}
CS0759: No defining declaration found for implementing declaration of partial method 'ViewController.myStepperAction(NSObject, EventArgs)'
Is there a way to pass the event to a partial method? Or is there a way to get an application mouse event?
What I want to do is when the stepper is clicked, check if the CTRL or SHIFT key is also pressed to make it increment by 10 instead of 1.