もう1つの質問
i Phone Simulator からアプリのテーブル ビューに連絡先をインポートする必要があり、テーブル ビューから連絡先をクリックして各連絡先の詳細を表示する必要がありますか? もしあれば、私にください
definition.h ファイルで宣言します。
- (void) showAlertWithTitle:(NSString *)title message:(NSString *)message;
そしてdeclaration.mファイルでは、以下のように使用します...
- (void) showAlertWithTitle:(NSString *)title message:(NSString *)message {
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:title message:message delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil, nil];
[alert show];
[alert release];
}
以下のように使用します..
if ([firstName.text length]==0){
[self showAlertWithTitle:@"Empty Field" mesage:@"Please Enter First Name"];
} else if([sndname.text length]==0){
[self showAlertWithTitle:@"Empty Field" mesage:@"Please Enter Second Name"];
}