歸檔與反歸檔

        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

相關文章
相關標籤/搜索