title: iOS - Custom UISwitch in UITableViewCell dealloc error
body: <p>I am using a UISwitch subclass to add UISwitches to all my UITableViewCells. I use the custom class to be able to pass more info to the UISwitch.</p>
  
  <p>The error I have on iOS 8 ONLY is:</p>
  
  <pre><code>*** -[NamedUISwitch _sendActionsForEvents:withEvent:]: message sent to deallocated instance
  </code></pre>
  
  <p>NamedUISwitch is the Custom UISwitch I made:</p>
  
  <pre><code>@interface NamedUISwitch : UISwitch
  @property (nonatomic, strong) NSString *specialinfo1;
  @property (nonatomic, strong) NSString *specialinfo2;
  @end
  
  @implementation NamedUISwitch
  
  @end
  </code></pre>
  
  <p>This is how I implement my UISwitch in the cellForRowAtIndexPath method.</p>
  
  <pre><code>- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
      UITableViewCell *cell = [[UITableViewCell alloc] init];
      NamedUISwitch *switchview = [[NamedUISwitch alloc] initWithFrame:CGRectZero];
      [switchview addTarget:self action:@selector(updateSwitchAtIndexPath:) forControlEvents:UIControlEventTouchUpInside];
      cell.textLabel.text = ...;
      switchview.nomEtablissement = ...;
      switchview.tag = ...;
      switchview.typeInfo = ...;
      cell.accessoryView = switchview;
      return cell;
  }
  </code></pre>
  
  <p>I have tried using Instruments to track the dealloc but I can't seem to get it to work the right way.
  How can I resolve this dealloc issue?</p>