alertはとくに苦労せずにかけた。メソッドの中に突っ込んで終わり。

  • (BOOL)textFieldShouldReturn:(UITextField *)textField {

[textField resignFirstResponder];
return YES;
}

  • (IBAction)executeCalc:(id) sender {

UIAlertView *alert = [[UIAlertView alloc]
initWithTitle:@"information"
message:@"いんふぉめーしょんだよ"
delegate:self
cancelButtonTitle:@"ok"
otherButtonTitles:@"website",nil ];

[alert show];
[alert release ];

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

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