title: iphone dev: UIImageview subclass interface builder - how to call custom initializer
body: <p>I messing with iphone developement.  I have a uiimageview subclass that I want to use to detect touches.  I have sucessfully added to interfacebuilder and I can detect a touch in my UIImageview subclass within my application so all is good on that front.  however my UIImageView subclass has a custom initializer which is not called when it is created in interface builder.</p>
  
  <p>if I manually initialize the UIImageview and add it programmatically I think it will work but then I lose the ability to 'see' my positioning in Interface builder.</p>
  
  <p>how can I either</p>
  
  <p>1) 'see' a uiimageview in interface builder that is added in code? (not possible?)
  2) call my custom initializer when the subclass is instantiated in interfacebuilder.</p>
  
  <p>thanks</p>
  
  <hr>
  
  <p>Hi thanks for suggestions.  I think I'm getting closer to understanding the relationship between the xib and the viewcontroller.</p>
  
  <p>I now am sucessfully adding my UIImageView subclass programmatically and using my custom initiializer which overrides InitWithFrame.</p>
  
  <p>I think I read that the xib calls 'awakeFromNib' so I could equally add my iniitialization code in there.  I like the idea of adding it programmatically as I have more control (although harderto set up my IU)</p>
  
  <p>so one more realted question.  if I add an UIImageView subclass in interface builder.  I can see it and detect touches on it.  if I want to refer to it in the view controller class do I have a pointer to it?  i.e. is there a variable name for it?  the UIImageViews I create myself I obviuosly know what they are called.....</p>