【发布时间】:2018-10-22 07:52:18
【问题描述】:
let person = Person()
person.name = "zhangzhe"
person.age = 25
print(self.home)
do {
try NSKeyedArchiver.archivedData(withRootObject: person, requiringSecureCoding: false)
} catch {
print(error)
}
我想设置路径,以便我可以再次找到它。 但我不知道该怎么办.. archiveRootObject(_ rootObject: Any, toFile path: String) 该方法在iOS12中已弃用
【问题讨论】:
标签: nskeyedarchiver