title: How to tell if a subclass overrides a method in Swift
body: <p>I’ve got a Swift class <code>Parent</code> that has a method <code>doSomething()</code> and I want to detect (in <code>Parent</code>) if a subclass has overridden <code>doSomething()</code>. How do I do that?</p>
  
  <pre><code>class Parent {
      func doSomething() {}
      func subclassOverridesDoSomething() -&gt; Bool {
          // what goes here?
          return true
      }
  }
  
  class Child: Parent {
      override func doSomething() {}
  }
  </code></pre>
  
  <p>I know I can do this with <code>NSObject</code> or even the Objective C runtime functions, but how can I do it with Swift classes?</p>