RubyMotion NSView com fundo gradiente
class GradientView < NSView def initWithFrame rect super.tap do @starting_color = NSColor.colorWithCalibratedWhite(1.0, alpha: 1.0) @ending_color = nil @angle = 270 end end def drawRect rect if @starting_color && @ending_color gradient …
Continuar lendo