[swift-users] #selector with Swift 3?

Maury Markowitz maury.markowitz at gmail.com
Fri Jun 17 14:48:57 CDT 2016


> On Jun 17, 2016, at 1:31 PM, Brent Royal-Gordon <brent at architechies.com> wrote:
> tl;dr: Write this instead:
> 
> 	case #selector(showRescale)?:

Tried that too, it causes another error:

    /Developer/SwiftNEC 3/SwiftNEC/CardViews.swift:139:28: Expected ':' after 'case'

Here are the formats I have tried; all fail with various errors:

    case #selector(showRescale):
    case #selector(showRescale)?:
    case #selector(showRescale)? :
    case #selector(showRescale)!:
    case #selector(showRescale)! :
    case #selector!(showRescale):
    case #selector!(showRescale) :

This format, however, did work:

    case Optional.some(#selector(showRescale)):

Optional.some? Urk.


More information about the swift-users mailing list