title: reading public var valid of subclass of NSTimer fails with 'isValid only defined for abstract class'
body: <p>I have created a subclass of NSTimer which adds (i hope) the pause and resume function to scheduledTimerWithTimeInterval function.</p>
  
  <pre><code>class HCTimer: NSTimer {
  
      var hcTimerInterval :NSTimeInterval!
      var hcTarget :AnyObject!
      var hcSelector :Selector!
      var hcUserInfo :AnyObject!
      var hcRepeats :Bool!
      var hcTimer :HCTimer!
  
      class func pausableScheduledTimerWithTimeInterval(ti: NSTimeInterval, target aTarget: AnyObject, selector aSelector: Selector, userInfo: AnyObject?, repeats yesOrNo: Bool) -&gt; HCTimer {
  
          let hcInstanceTimer = super.scheduledTimerWithTimeInterval(ti,target: aTarget, selector: aSelector, userInfo: userInfo, repeats: yesOrNo) as! HCTimer
  
          hcInstanceTimer.hcTimerInterval = ti
          hcInstanceTimer.hcTarget = aTarget
          hcInstanceTimer.hcSelector = aSelector
          hcInstanceTimer.hcUserInfo = userInfo!
          hcInstanceTimer.hcRepeats = yesOrNo
          hcInstanceTimer.hcTimer = hcInstanceTimer
  
          return hcInstanceTimer
      }
  
      func pause() {
          self.invalidate()
      }
  
      func resume() {
          self.hcTimer = HCTimer.pausableScheduledTimerWithTimeInterval(hcTimerInterval, target: hcTarget, selector: hcSelector, userInfo: hcUserInfo, repeats: hcRepeats)
      }
  }
  </code></pre>
  
  <p>To use the new class in the existing viewController, i replaced the existing properties of type NSTimer with HCTimer. The timer is started when a button is pressed and the timer is not valid.</p>
  
  <pre><code>class ViewController: UIViewController {
  
      var severityButtonTimer = HCTimer()
  
      @IBAction func sortOnSeverityButtonTouchInside(sender: UIButton) {
  
          // Start animation if none running
          if (!severityButtonTimer.valid) {
              // Change sort order
  </code></pre>
  
  <p>The code compiles successfully, but when the function the value 'valid' of the HCTimer instance is read it fails with the following exception.</p>
  
  <pre><code>2016-04-08 12:03:25.234 homecaremonitor[45750:17518480] *** Terminating app     due to uncaught exception 'NSInvalidArgumentException', reason: '*** -isValid only defined for abstract class.  Define -[homecaremonitor.HCTimer isValid]!'
  *** First throw call stack:
  (
      0   CoreFoundation                      0x000000010f4c5d85     __exceptionPreprocess + 165
      1   libobjc.A.dylib                     0x0000000111269deb objc_exception_throw + 48
      2   CoreFoundation                      0x000000010f4c5cbd +[NSException raise:format:] + 205
      3   Foundation                          0x000000010f9477b9 NSRequestConcreteImplementation + 229
      4   Foundation                          0x000000010f95aa19 -[NSTimer(NSTimer) isValid] + 39
      5   homecaremonitor                     0x000000010ef43f78 
  </code></pre>
  
  <p>Still trying to fix this, any help is appreciated !
  Cheers,
  Peter</p>
  
  <p>Replaced the subclass <code>HCTimer</code> with <code>HCTimerWrapper</code> as adviced by Wain</p>
  
  <pre><code>class HCTimerWrapper {
  
      var hcTimerInterval :NSTimeInterval!
      var hcTarget :AnyObject!
      var hcSelector :Selector!
      var hcUserInfo :AnyObject!
      var hcRepeats :Bool!
      var hcTimer :NSTimer!
      var valid : Bool {
          get {
              if hcTimer != nil  {
                  return hcTimer.valid
              } else {
                  return false
              }
          }
      }
  
      func pausableScheduledTimerWithTimeInterval(ti: NSTimeInterval, target aTarget: AnyObject, selector aSelector: Selector, userInfo: AnyObject?, repeats yesOrNo: Bool) {
  
          let hcInstanceTimer = NSTimer.scheduledTimerWithTimeInterval(ti,target: aTarget, selector: aSelector, userInfo: userInfo, repeats: yesOrNo)
  
          self.hcTimerInterval = ti
          self.hcTarget = aTarget
          self.hcSelector = aSelector
          self.hcUserInfo = userInfo!
          self.hcRepeats = yesOrNo
          self.hcTimer = hcInstanceTimer  
      }
  
      func pause() {
          self.hcTimer.invalidate()
      }
  
      func resume() {
          self.hcTimer = NSTimer.scheduledTimerWithTimeInterval(self.hcTimerInterval, target: self.hcTarget, selector: self.hcSelector, userInfo: self.hcUserInfo, repeats: self.hcRepeats)
      }
  }
  </code></pre>