如何从 iOS app 中离线保存的 csv 文件中读取。
How to read from a csv file saved offline in iOS app .
我在我的 iOS 应用程序中拖放了一个我想阅读的 .csv 文件。我知道从文件中读取的方法,但我不知道如何找出它的路径。
那么,我怎样才能找出路径?
使用资源路径:
NSString *filePath = [[NSBundle mainBundle] pathForResource:@"fileName" ofType:@"fileExtension"];
我在我的 iOS 应用程序中拖放了一个我想阅读的 .csv 文件。我知道从文件中读取的方法,但我不知道如何找出它的路径。
那么,我怎样才能找出路径?
使用资源路径:
NSString *filePath = [[NSBundle mainBundle] pathForResource:@"fileName" ofType:@"fileExtension"];