我正在尝试编写NSPredicate
来提取用户ID和claimID,我得到下面的错误。'无法解析格式字符串'claimID!=''&userID =%@“'
Terminating app due to uncaught exception NSInvalidArgumentException', reason: 'Unable to parse the format string "claimID != '' & userID = %@"'
我的代码是 -
+(NSArray*)fetchNotificationsWithPredicate {
NSPredicate *predicate=[NSPredicate predicateWithFormat:@"claimID != '' & userID = %@",[[NSUserDefaults standardUserDefaults] objectForKey:@"usernmae"]];
NSLog(@"%@",[self fetchNotifications]);
NSArray *loginUsers = [DBUtils createAndExecuteFetchRequestWithPredicate:@"Notification" predicate:predicate];
return loginUsers;
}
检查...什么革命性的新概念!这永远不会流行。 – gnasher729