IOS 各种文件路径获取

来源:互联网 发布:免费顶级域名ml 编辑:程序博客网 时间:2024/05/21 06:32



1、获取应用程序中包含的资源文件绝对路径

需求:项目中有些数据,使用的时候需要使用绝对路径去读取,所以需要获取文件的绝对路径

NSBundle *bundle = [ NSBundle mainBundle ];
NSString *filePath = [ bundle pathForResource:@"FileName" ofType:@"Extension" ];


原创粉丝点击