title: Dealloc of UIView subclass prevents running class methods
body: <p>I've created a UIView subclass with a UIButton inside with target on tap inside.
  The selector is implemented inside the UIView subclass and linked by Interface Builder.</p>
  
  <p>But when I run addSubview in parent view controller tapping button will cause </p>
  
  <blockquote>
    <p>performSelector:withObject:withObject:]: message sent to deallocated
    instance</p>
  </blockquote>
  
  <p>(I use ARC)
  I added some console output in dealloc method and I see that right after viewDidLoad ends with addSubview of the UIView subclass, the sublass is deallocated.</p>
  
  <p>How to prevent that sort of situation?
  I tried @property(nonatomic, retain), adding instance to some global array...
  But no luck.</p>
  
  <p>I understand that ARC releses the object as there is no strong reference left but I couldn't force to prevent that situation.</p>
  
  <p>Any help would be appreciated.</p>