还有一个问题
我需要将联系人从i手机模拟器导入到我的应用程序表视图中,我应该通过单击表格视图中的联系人显示每个联系人的详细信息有可能吗?如果它在那里请给我
答案 0 :(得分:0)
在declaration.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"];
}