|
May
16 |
|
accepted | See saved class from NSManagedObjectContextDidSaveNotification? |
|
May
16 |
|
asked | See saved class from NSManagedObjectContextDidSaveNotification? |
|
May
13 |
|
revised |
Predicate for many-to-many relationship added 169 characters in body |
|
May
13 |
|
comment |
NSSortDescriptor - Sort descriptor based on another array @MartinR thanks Martin. I have created another question: stackoverflow.com/questions/16528039/…. If you want, then you can take a look. Thanks! :) |
|
May
13 |
|
asked | Predicate for many-to-many relationship |
|
May
13 |
|
comment |
NSSortDescriptor - Sort descriptor based on another array @MartinR I added an update to my original post, is that relationship correct? |
|
May
13 |
|
revised |
NSSortDescriptor - Sort descriptor based on another array added 263 characters in body |
|
May
13 |
|
comment |
NSSortDescriptor - Sort descriptor based on another array @MartinR Thanks, thats a good idea! The only thing is that the user objects can be created in different locations/times. But that maybe wont matter? Could it work if I only add users to the Followers relationship when I actually needs to? Could I go back to the FRC? If so, how should the sort predicate look like? |
|
May
13 |
|
comment |
NSSortDescriptor - Sort descriptor based on another array Thanks, is the performance of this solution better then @MartinR's? And how/why is that? |
|
May
13 |
|
comment |
NSSortDescriptor - Sort descriptor based on another array Thanks, got it to work now! Puh. |
|
May
13 |
|
accepted | NSSortDescriptor - Sort descriptor based on another array |
|
May
13 |
|
comment |
NSSortDescriptor - Sort descriptor based on another array I have now trie you method. Like this: self.objects = [self.objects sortedArrayUsingComparator:^NSComparisonResult(id obj1, id obj2) {
NSUInteger idx1 = [self.user.followingIds indexOfObject:[obj1 valueForKey:@"userId"]];
NSUInteger idx2 = [self.user.followingIds indexOfObject:[obj2 valueForKey:@"userId"]];
return idx1 - idx2;
}]; But it doesn't seem to return the items in the right order. Do the types in self.user.followingIds and the value of [obj1 valueForKey:@"userId"] be NSUInteger's?
|
|
May
13 |
|
comment |
NSSortDescriptor - Sort descriptor based on another array @MartinR Thanks, will try the array route. |
|
May
13 |
|
comment |
NSSortDescriptor - Sort descriptor based on another array @MartinR Ok, do you know if it's possible to "resort" the result in a NSFechResultController fetch? I use a NSFechResultController as my datasource in the tableview... |
|
May
13 |
|
comment |
NSSortDescriptor - Sort descriptor based on another array Thanks, I have tried your solution but can't quite get it to work. See my updated answer. Any ideas? |
|
May
13 |
|
revised |
NSSortDescriptor - Sort descriptor based on another array added 1245 characters in body |
|
May
13 |
|
comment |
NSSortDescriptor - Sort descriptor based on another array Thanks, how do your localizedStandardCompare method look? |
|
May
13 |
|
asked | NSSortDescriptor - Sort descriptor based on another array |
|
May
12 |
|
accepted | NSLayoutConstraint - dynamic height of a superview |
|
May
10 |
|
revised |
NSLayoutConstraint - dynamic height of a superview added 7 characters in body |