import Foundation protocol Foo: NSObjectProtocol { func a() } class Bar: NSObject, Foo { func a() { } } // Foo2はObj-C headerに宣言 class Bar2: NSObject, Foo2 { func a() { } } // true print(class_getInstanceMethod(Bar.self, Selector("a")) == nil) // false print(class_getInstanceMethod(Bar2.self, Selector("a")) == nil)
(edited)