展示圖形的輕量級解決方案:MCGraphView

jopen 10年前發布 | 12K 次閱讀 iOS開發 移動開發 MCGraphView

用于顯示圖形的輕量級解決方案。
展示圖形的輕量級解決方案:MCGraphView

使用MCGraphView

Add the MCGraphView class either programmatically or assign the custom class via storyboard. Then set the lineData property:

self.graphView.lineData = @[
  @[
    [NSValue valueWithCGPoint:CGPointMake(1, 20)],
    [NSValue valueWithCGPoint:CGPointMake(2, 40)],
    [NSValue valueWithCGPoint:CGPointMake(3, 20)],
    [NSValue valueWithCGPoint:CGPointMake(4, 60)],
    [NSValue valueWithCGPoint:CGPointMake(5, 40)],
    [NSValue valueWithCGPoint:CGPointMake(6, 140)],
    [NSValue valueWithCGPoint:CGPointMake(7, 80)],
  ],
  @[
    [NSValue valueWithCGPoint:CGPointMake(1, 40)],
    [NSValue valueWithCGPoint:CGPointMake(2, 20)],
    [NSValue valueWithCGPoint:CGPointMake(3, 60)],
    [NSValue valueWithCGPoint:CGPointMake(4, 100)],
    [NSValue valueWithCGPoint:CGPointMake(5, 60)],
    [NSValue valueWithCGPoint:CGPointMake(6, 20)],
    [NSValue valueWithCGPoint:CGPointMake(7, 60)],
  ]
];

項目主頁:http://www.baiduhome.net/lib/view/home/1417245346627

 本文由用戶 jopen 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。
 轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。
 本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!