The problem in your Action method is a typo
Code:
- (IBAction)btnClicked:(id)sender {
NSString *str = [[NSString alloc]
initWithFormat:@"Hello, %@", nameTextField.text ];
UIAlertView *alert = [[UIAlertView alloc]
initWithTitle:@"Hello"
message: str
delegate:self
cancelButtontitle:@"OK" //is incorrect
otherButtonTitles:nil, nil];
[alert show];
[alert release];
[str release];
}
should be
Code:
- (IBAction)btnClicked:(id)sender {
NSString *str = [[NSString alloc]
initWithFormat:@"Hello, %@", nameTextField.text ];
UIAlertView *alert = [[UIAlertView alloc]
initWithTitle:@"Hello"
message: str
delegate:self
cancelButtonTitle:@"OK" //is correct - the word Title is capitalized
otherButtonTitles:nil, nil];
[alert show];
[alert release];
[str release];
}
All method names have the argument names in camelCase. If you manually type in the methods watch for this. Whenever possible let autofill do its thing.
From your supplied code I don't see the issue with the @property. If you have not yet resolved it an you still need help send the project to
iPadHelper@me.com
It is possible the error is caused somewhere else, so having the complete project will make it easier to track down.
Bob