Using @objc output in Swift 4

I get this warning:

The argument '#selector' refers to the instance method 'customButtonDidTouch ()' in 'CustomTableViewController', which depends on the output of the '@objc' attribute is deprecated in Swift 4

Xcode suggests adding @objcto my method customButtonDidTouch(), but a different warning is issued:

Using Swift 3 @objc output in Swift 4 mode is deprecated. Please refer to the obsolete @objc ban warnings, check your code with the protocol "Using obsolete Swift 3 @objc login", and disable the Swift 3 @objc method.

Any suggestions?

+4
source share

Source: https://habr.com/ru/post/1679078/


All Articles