貧しい私の英語を残念に思う。私は線グラフではなく、グラフでいくつかの線を描きたいですか?
これは私の質問です。
グラフ(https://github.com/danielgindi/Charts)で線を描きたいと思います。私はラインに関する情報を持っています。例えば
:
@interface Line : NSObject
@property (assign, nonatomic) float x1;//x of the first point
@property (assign, nonatomic) float x2;//x of the second point
@property (assign, nonatomic) float y1;//y of the first point
@property (assign, nonatomic) float y2;//y of the second point
-(instancetype)initWithX1:(float)x1 withY1:(float)y1 withX2:(float)x2 withY2:(float)y2;
@end
私はその後、私はそれを描きたい、配列に行のオブジェクトを置きます。
どうすればこの機能を実現できますか?
を使用** drawInRect:**上このビュー。 – Sergey
@ Sergeyあなたは私にもっと情報を提供できますか?メソッドdrawInRect:どのクラスが属していますか? –
チャートデモを見ましたか? – Koen