何时使用pathForResource获取文件路径

    //两种取图片路径方法区别
    NSString *path = [[NSBundle mainBundle]pathForResource:@"1" ofType:@"JPG"];
    UIImage *image = [UIImage imageNamed:@"1.JPG"];
   
   // UIImage *image = [UIImage imageWithContentsOfFile:path];
相关文章
相关标签/搜索