Вопрос: Есть ли способ использовать существующие методы objective-c для выполнения полной глубокой копии NSDictionary или NSArray, которые сами имеют вложенные словари или массивы внутри них?
То есть, я прочитал проблему, может быть, когда она попадает в вложенный словарь или массив, она копирует только указатель на вложенный элемент и не копирует элемент по-настоящему.
Справочная информация. В качестве примера для меня я пытаюсь загрузить/сохранить следующую конфигурацию с помощью NSUserDefaults, и при загрузке необходимо преобразовать неизменяемые копии, которые можно получить из NSUserDefault для изменения до внесения изменений.
- Элементы (NSDictionary)
- Элемент (NSDictionary)
- aString: NSString
- aString2: NSString
- aDate: NSDate
- aDate2: NSDate
- aBool: BOOL
- aTI1: NSTimeInterval
- aTI2: NSTimeInterval
- Ключевые слова (NSArray)
- ключевое слово: NSString
- ключевое слово: NSString
- Элемент (NSDictionary)