setEventHandler(_:andSelector:forEventClass:andEventID:)
Registers the Apple event handler specified by handler for the event specified by eventClass and eventID.
Declaration
func setEventHandler(_ handler: Any, andSelector handleEventSelector: Selector, forEventClass eventClass: AEEventClass, andEventID eventID: AEEventID)Discussion
If an event handler is already registered for the specified event class and event ID, removes it. The signature for handler should match the following:
- (void)handleAppleEvent:(NSAppleEventDescriptor *)event withReplyEvent: (NSAppleEventDescriptor *)replyEvent;