Search code examples
core-plotrubymotion

CorePlot using Rubymotion


I'm playing around with CorePlot using rubymotion.

Can anyone help me translate this objective c method call to rubymotion syntax?

overlayGradient = [overlayGradient addColorStop:[[CPTColor blackColor] colorWithAlphaComponent:0.0] atPosition:0.9];

Solution

  • Here it is in RubyMotion syntax:

    overlayGradient = overlayGradient.addColorStop(CPTColor.blackColor.colorWithAlphaComponent(0.0), atPosition:0.9)