归档与反归档

        NSArray*array=@[ @"one",@"two"];atom

        NSString*path=@"/Users/shenhaichao/Desktop/text.txt";spa

        BOOL r =[array writeToFile:path atomically:YES];.net

        NSLog(@"%@",r==1?@"YES":@"NO");orm

        

        NSArray*array1=[NSArray arrayWithContentsOfFile:path];get

        NSLog(@"%@",array1);it

相关文章
相关标签/搜索