問題タブ [cptimage]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
core-plot - xcassets ファイルの画像から CPTImages を作成する
したがって、これによると、imageNamed
現在 iOS で画像をロードするために使用する必要があります。
残念ながら、CPTImage のコンストラクターには、画像を読み込むためのパスが必要です。
だから、このようなもの:
[CPTImage imageForPNGFile:[[NSBundle mainBundle] pathForResource:@"plotsymbol" ofType:@"png"]]
これらの-pathForResource
呼び出しは、アセット カタログが原因で失敗するようになりました。
だから..誰もこれを行うことができましたか? 私は何か見落としてますか?