Posted By

danhanly on 03/22/11


Tagged

IBOutlet


Versions (?)

Linking Interface Builder to XCode


 / Published in: Objective C
 

Important: After adding the Header File Code below, save then jump back to Interface Builder and Ctrl+Click on File's Owner and assign the Outlet to the correct component under View.

  1. /* HEADER FILE */
  2. #import <UIKit/UIKit.h>
  3.  
  4. @interface ViewController : UIViewController {
  5. IBOutlet UIClassName *variableName;
  6. }
  7.  
  8. @property (nonatomic, retain) UIClassName *variableName;
  9.  
  10. @end
  11.  
  12.  
  13. /* IMPLEMENTATION FILE */
  14. #import "ViewController.h"
  15.  
  16. @implementation ViewController
  17.  
  18. @synthesize variableName;
  19.  
  20. - (void)dealloc {
  21. [variableName release];
  22. [super dealloc];
  23. }
  24.  
  25. @end

Report this snippet  

You need to login to post a comment.