[iOS] Simple iOS program : Hello World!

螢幕快照 2014 03 01 下午6 31 37

螢幕快照 2014 03 01 下午6 32 04

 @synthesize not showing up for the auto generated properties in Xcode 4.5

ViewController.h :

//
//  ViewController.h
//  HelloWorld

#import <UIKit/UIKit.h>

@interface ViewController : UIViewController

@property (strong, nonatomic) IBOutlet UILabel *displayLabel;

- (IBAction)pressedButton:(id)sender;

@end

ViewController.m :

//
//  ViewController.m
//  HelloWorld

#import "ViewController.h"

@interface ViewController ()

@end

@implementation ViewController
@synthesize displayLabel;

- (void)viewDidLoad
{
    [super viewDidLoad];
	// Do any additional setup after loading the view, typically from a nib.
}

- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

- (IBAction)pressedButton:(id)sender {
    displayLabel.text = @"Hello World!";
}
@end