看起来:
[[NSBundle mainBundle] pathForResource:@"name" ofType:@"png"];
不为Images.xcassets资产目录中的资产返回任何内容.我也尝试过:
[[NSBundle mainBundle] pathForResource:@"name" ofType:@"png" inDirectory:@"Images"];
[[NSBundle mainBundle] pathForResource:@"name" ofType:@"png" inDirectory:@"Images.xcassets"];
但这些都没有.
有没有人成功检索目录中的资产路径?