我有一个字符串,当我比较它时,它在 NSLog 中显示以下 ling 它总是在其他地方运行
插入的记录:-1
如果数据等于给定文本,如何使其工作,否则明智地运行
NSLog(@"%@ ",data);
if ([data isEqualToString:@"Records inserted: -1"]) {
NSString*messageShow=[NSString stringWithFormat:@"Title name %@ already been added to Library",titleNameShow];
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Alert" message:messageShow delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil];
[alert show];
[alert release];
}
else {
NSString*messageShow=[NSString stringWithFormat:@"%@ added to Library",titleNameShow];
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Alert" message:messageShow delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil];
[alert show];
[alert release];
}