churabou / iOS-develop-blog

0 stars 0 forks source link

5月18日 @objc in Protocol #30

Open churabou opened 6 years ago

churabou commented 6 years ago
@objc protocol RegistrationControllerProtocol: class {
    func actionBack()
}

extension RegistrationControllerProtocol where Self: UIViewController {

    func setUp() {
     ....#selector(actionBack)
   }

したのはだめ

protocol RegistrationControllerProtocol: class {
   @objc  func actionBack()
}

extension RegistrationControllerProtocol where Self: UIViewController {

    func setUp() {
     ....#selector(actionBack)
   }