alertの中に変数を格納する。これもすぐできた。OJT~C データ型にうるさすぎ

  • (IBAction)executeCalc:(id) sender {


[income resignFirstResponder];
[cost resignFirstResponder];
int str = [income.text intValue];
int str2 = [cost.text intValue];
int str3 = str - str2;

[dpi setText:[NSString stringWithFormat:@"%d", str3]];


UIAlertView *alert = [[UIAlertView alloc]

initWithTitle:@"information"
message:@"いんふぉめーしょんだよ"
delegate:self
cancelButtonTitle:@"ok"
otherButtonTitles:@"website",nil ];
alert.message=[NSString stringWithFormat:@"%d", str3];

[alert show];
[alert release ];