CoreData one-to-many default to generate NSSet ,how to change NSSet to NSMutableArray?I try to change it manually,but get error:
_NSFaultingMutableSet filteredArrayUsingPredicate:]: unrecognized selector sent to instance 0x1ed35e40'
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
NSSethas the methodallObjects, which returns anNSArray.To get an
NSMutableArrayyou could do this:Note: order is not guaranteed to be the same every time (sets aren’t ordered). If order is important to you, consider an
NSOrderedSetinstead.See also the docs on
NSSet:https://developer.apple.com/library/mac/#documentation/Cocoa/Reference/Foundation/Classes/NSSet_Class/Reference/Reference.html
PS:
The reason you’re getting said error:
NSSet(or_NSFaultingMutableSetfor that matter) doesn’t have a method calledfilteredArrayUsingPredicate.