This is a relevant article https://www.mikeash.com/pyblog/friday-qa-2015-12-25-swifty-targetaction.html?utm_campaign=iOS%2BDev%2BWeekly&utm_medium=email&utm_source=iOS_Dev_Weekly_Issue_231
For this topic Sent from my iPhone > On 31 Dec 2015, at 01:33, James Campbell <[email protected]> wrote: > > Good point. Not sure if that's replaceable via a protocol or if that Api is > just not suited for swift. > > There is a proposal somewhere to be able to reference swift methods via back > ticks a sort of selector for swift so maybe in this case we would use that. > > Sent from my iPhone > >> On 30 Dec 2015, at 20:27, Tino Heth <[email protected]> wrote: >> >> >>> I'm not as familiar with OS X but why is it vital there ? >> >>> Do you have an example of use ? >> >> If those questions are for me ;-): >> Afair (have to do iOS most of the time now), "Undo" is the most prominent >> example. You don't link those menu entries to a concrete object, but rather >> say "bind this to a selector whose name is…", and then the system can >> determine the actual target (there may be many controls which support undo). >> Additionally, before this can happen, the system has to determine wether an >> entry is enabled at all — you can't do this when you have only a simple >> closure. >> >> Best regards, >> Tino _______________________________________________ swift-evolution mailing list [email protected] https://lists.swift.org/mailman/listinfo/swift-evolution
