1、NSKeyedArchiver
NSString *plistName = [NSString stringWithFormat:@"TeacherTaskClass_%@.plist",[User userId]];
NSString *path = [[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory,NSUserDomainMask,YES) objectAtIndex:0] stringByAppendingPathComponent:plistName];
if ([[NSFileManager defaultManager] fileExistsAtPath:path] == NO) {
NSFileManager *fileManager = [NSFileManager defaultManager];
[fileManager createFileAtPath:path contents:nil attributes:nil];
}
[NSKeyedArchiver archiveRootObject:self.taskBtnArr toFile:path];