I am trying to loop through an NSSet that has about 6500 items in it. I am using:
for (id Location in sortedArray) {
loc = [sortedArray objectAtIndex:i];
cord = [cord stringByAppendingString:[NSString stringWithFormat:@"%f,%f ",[loc.longitude doubleValue],[loc.latitude doubleValue]]];
i++;
}
...
Ok.
I have an array with multiple objects populated by my core data stack
.
Lets say each object has a name, startdate, enddate and amount attribute associated with them
What I need to do is reduce this array down to only the unique objects (not just values) based on the name, which is an NSString.
I've tried isEqual methods within fo...
If you can't get an object with objectAtIndex: from an NSSet then how do you retrieve objects?
...
I'm able to put the contents of an NSSet into an NSMutableArray like this:
NSMutableArray *array = [set allObjects];
The compiler complains though because [set allObjects] returns an NSArray not an NSMutableArray. How should this be fixed?
...
I have an NSMutableArray that I display through a table view. The problem is that when I add objects to this array, I don't want to have duplicates.
If I create an NSMutableSet from the NSMutableArray, then add objects to the NSMutableSet and then convert it back to an NSMutableArray, is that any more efficient than checking the NSMutab...
I have a list of custom objects being returned from a .NET WebService and am storing them using a To-Many relationship from the parent enitity with Core Data.
I want to use the NSSet as the datasource for a UITableView and push a new controller onto the stack when a row is selected.
When using [NSSet allObjects] does the array re...
I have an array which stores custom objects.
Objects are of type Venue which have a property defined as name(which contains the names of venue).
Now I want to filter out objects with unique names.
This is how I was trying to do.
NSSet *uniqueVenuesSet = [NSSet setWithArray:[venueArray valueForKey:@"name"]];
NSMutableArray *uniqueVe...
Hi all. I'm trying to find the maximum value in the order property in this coredata object:
#import <Foundation/Foundation.h>
#import "Story.h"
@class Story;
@interface Sentence : NSManagedObject {
}
@property (nonatomic, retain) NSString *text;
@property (nonatomic, retain) NSString *image;
@property (nonatomic, re...
Edit: better example...
So I have an NSMutableSet of "existing" objects and I'd like to download JSON data, parse it, and merge these new objects with my existing ones, updating any duplicates with the newly downloaded ones. Here's what the existing set of objects looks like:
NSArray *savedObjects = [NSArray arrayWithObjects:
[NSD...