title: set image for UIButton
body: <p>I want to add an image button to my xcode project. I added a Round Rect Button using the interface builder. </p>
  
  <p>In my .h file:</p>
  
  <pre><code>@property (nonatomic, retain) IBOutlet UIButton *infobutton;
  </code></pre>
  
  <p>In my .m file:</p>
  
  <pre><code>@synthesize infobutton;
  
  -viewDidLoad{
  infobutton = [[UIButton buttonWithType:UIButtonTypeCustom] retain];
  UIImage* infobuttonImg =[UIImage imageNamed:@"info.png"];    
  [infobutton setImage:infobuttonImg forState:UIControlStateNormal];
  [infobuttonImg release];
  }
  </code></pre>
  
  <p>Finally, I add a link in my interface builder linking the Round Rect Button to infobutton. However, when I run the simulator, I still got the plain Round Rect Button on my interface rather than having the button displayed as the image that I have set. I wonder if there is anything that I have missed in my code.  </p>