Hi,
I have written a class and declared a variable. How can I reach it with different messages?
Interface-File Deklarations:
int value;
- (void)valueHasChanged
int)v;
- (void)showIt;
Implementation-File:
- (void)valueHasChanged
int)v {
value = v;
}
- (void)showIt {
NSString *sendtext = [NSString stringWithFormat
"%i", value];
UIAlertView *alert = [[UIAlertView alloc]
initWithTitle:sendtext message
" Here it is! " delegate:self
cancelButtonTitle
"OK" otherButtonTitles:nil];
[alert show];
[alert release];
}
I have written a class and declared a variable. How can I reach it with different messages?
Interface-File Deklarations:
int value;
- (void)valueHasChanged
- (void)showIt;
Implementation-File:
- (void)valueHasChanged
value = v;
}
- (void)showIt {
NSString *sendtext = [NSString stringWithFormat
UIAlertView *alert = [[UIAlertView alloc]
initWithTitle:sendtext message
cancelButtonTitle
[alert show];
[alert release];
}