title: Programmatically creating a UIButton inside a custom UIView subclass, how does one access the file owner to add a target method? delegates?
body: <p>I have a root view controller which loads a custom UIView subclass I have created and adds it as a subview.</p>
  
  <p>Inside this custom UIView subclass I code/generate a UIButton in the awakeFromNib method.</p>
  
  <p>Is there a simple way to access the File Owner without creating a delegate if the UIButton's action method is inside the root view controller?</p>
  
  <p>E.g</p>
  
  <pre><code>[myButton addTarget:[self.file_owner ?] action:@selector(methodInFileOwner:) ....
  </code></pre>
  
  <p>Using Interface Builder it's still easy to assign a UIView my custom UIView subclass and just drag a UIButton's selector reference to the file owner. Voila!</p>
  
  <p>How is this done through code though? Do I have to create a delegate and use </p>
  
  <pre><code>[myButton addTarget:[self.delegate] ... 
  </code></pre>
  
  <p>?</p>