문제

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?

도움이 되었습니까?

해결책

The CPTImage class will include an imageNamed method in a future release. It is available now on the release 2.0 branch. People are using the 2.0 code now but it is unfinished and subject to change in many areas before the final release.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top