cptimage

Creating CPTImages from images in xcassets file

↘锁芯ラ 提交于 2019-12-25 11:04:13
问题 So according to this, you have to use imageNamed for loading images now in iOS. Unfortunately, CPTImage's constructors requires paths for loading images So something like this: [CPTImage imageForPNGFile:[[NSBundle mainBundle] pathForResource:@"plotsymbol" ofType:@"png"]] These -pathForResource calls now fail because of asset catalogs. So.. has anyone been able to do this? Did I miss something? 回答1: The CPTImage class will include an imageNamed method in a future release. It is available now