Search code examples
swift3xcode8eventtrigger

Swift: Error occurs after upgrading Xcode 7.2 to 8


I am currently facing a problem after updating Xcode 7.2 to Xcode 8. Here is the screenshot of the workingspace. Everything worked fine before the update. Did Apple change something in terms of trigger event?


Solution

  • The syntax for selectors has changed significantly. Instead of this:

    Selector(runCalculation())
    

    You should use:

    #selector(runCalculation)
    

    For more info on #selector syntax, check out this post from the Swift team.