http://paulpeelen.com/2011/03/17/xcode-4-ios-4-3-hello-world/
One thing to add to the tutorial
Click Project>Edit Scheme and Change Iphone simulator to IPAD
HelloWorldViewController.h file:
//
// HelloWorldViewController.h
// HelloWorld
//
// Created by Paul Peelen on 2011-03-14.
// Copyright 2011 9697271014. All rights reserved.
//
//
// HelloWorldViewController.m
// HelloWorld
//
// Created by Paul Peelen on 2011-03-14.
// Copyright 2011 9697271014. All rights reserved.
//
#import “HelloWorldViewController.h”
@implementation HelloWorldViewController
@synthesize textLabel;
– (void)dealloc
{
[textLabel release];
[super dealloc];
}
– (IBAction)changeTheTextOfTheLabel
{
[textLabel setText:@”Hello, World!”];
}
– (void)didReceiveMemoryWarning
{
// Releases the view if it doesn’t have a superview.
[super didReceiveMemoryWarning];
// Release any cached data, images, etc that aren’t in use.
}
#pragma mark – View lifecycle
/*
// Implement viewDidLoad to do additional setup after loading the view, typically from a nib.
– (void)viewDidLoad
{
[super viewDidLoad];
}
*/
– (void)viewDidUnload
{
[super viewDidUnload];
// Release any retained subviews of the main view.
// e.g. self.myOutlet = nil;
}
– (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
// Return YES for supported orientations
return (interfaceOrientation == UIInterfaceOrientationPortrait);
}
@end
#import
@interface HelloWorldViewController : UIViewController {
UILabel *textLabel;
}
@property (nonatomic, retain) IBOutlet UILabel *textLabel;
– (IBAction)changeTheTextOfTheLabel;
@end