ios coredata有没有count总数
展开全部
我刚开始跟着老头学iOS开发,他的做法似乎是这样的:NSFetchRequest *request = [NSFetchRequest fetchRequestWithEntityName: @"XXX"]; request.predicate = [NSPredicate predicateWithFormat:@"type= %@",@“2”]; NSSortDescriptor *sortDescriptor = [NSSortDescriptor sortDescriptorWithKey: @"XXXX" ascending:YES]; request.sortDescriptors = [NSArray arrayWithObject:sortDescriptor]; NSError *error = nil; NSArray *match = [context executeFetchRequest:request error:&error];这样得
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询