I have an array of NSManagedObject's
and I want to copy them to a new array in order to manipulate them and not save the changes after the user is done.
The array:
var origQuestions: [Questions]?
This is how I retreive the data from CoreData:
self.origQuestions = MainDb.sharedInstance.randomQuestions(entity: "Questions", count: self.questionToShow)
This is what I need in Objective-C, but I want to know how to do so in Swift 4:
NSMutableArray *questionsCopy = [[NSMutableArray alloc] initWithArray:self.origQuestions copyItems:YES];