Add closure wrapper to allow more easily calling action:target:
-like methods?
#561
Labels
A-framework
Affects the framework crates and the translator for them
enhancement
New feature or request
question
Further information is requested
It is common in AppKit and UIKit to have methods that expect to run a selector on an object. These are usually legacy methods that were introduced before blocks were added to / common in Objective-C, or work this way because the event bubbles upwards.
Examples include
NSMenuItem
,NSNotificationCenter
andUIGestureRecognizer
.It would maybe be nice if we had some object wrapper around closures, such that one didn't have to go through the whole of
declare_class!
just to handle an event?I'm thinking something similar to:
The text was updated successfully, but these errors were encountered: