my at end is saying Expected declaration or statment at end input what dose that mean and my
Code:
- (void)viewDidLoad{
is saying viewDidLoad undeclared and i don't know were i went wrong
Code:
#import "georgeissupersexyViewController.h"
@implementation georgeissupersexyViewController
@synthesize firstLabel;
@synthesize labelsText;
-(IBAction) clicked: (id)sender{
NSString *titleofButton = [sender titleForState:UIControlStateNormal];
NSString *newLabelText = [[NSString alloc] initWithFormat:@"%@", titleofButton];
labelsText.text = newLabelText;
[newLabelText release];
/*
// The designated initializer. Override to perform setup that is required before the view is loaded.
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil {
if ((self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil])) {
// Custom initialization
}
return self;
}
*/
// Implement loadView to create a view hierarchy programmatically, without using a nib.
//- (void)loadView {
// Implement viewDidLoad to do additional setup after loading the view, typically from a nib.
- (void)viewDidLoad{
UIAlertView *alert = [[UIAlertView alloc]
initWithTitle:@"Here's is a game."
message:@"find skocko"
delegate:nil
cancelButtonTitle:@"Click to go to game"
otherButtonTitles:nil];
[alert show];
[alert release];
[super viewDidLoad];
}
// Override to allow orientations other than the default portrait orientation.
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
// Return YES for supported orientations
return (interfaceOrientation == UIInterfaceOrientationPortrait);
}
*/
-(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.
}
-(void)viewDidUnload {
// Release any retained subviews of the main view.
// e.g. self.myOutlet = nil;
}
-(void)dealloc {
[super dealloc];
}
-(void) touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event{
firstLabel.text=@"find skocko";
}
-(void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event{
firstLabel.text=@"come one find him";
}
-(void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event{
firstLabel.text=@"ok just find him";
}
-(void)touchesMovedEnded:(NSSet *)touches withEvent:(UIEvent *)event{
firstLabel.text=@"please find him";
[super dealloc];
[LabelsText relese];
}
@end