Class: UIColor

Inherits:
Object
  • Object
show all
Defined in:
lib/swipe_action_cell/ui_color.rb

Instance Method Summary collapse

Instance Method Details

#alphaObject



18
19
20
21
# File 'lib/swipe_action_cell/ui_color.rb', line 18

def alpha
  c = CGColorGetComponents(self.CGColor)
  c[CGColorGetNumberOfComponents(self.CGColor) - 1]
end

#blueObject



13
14
15
16
# File 'lib/swipe_action_cell/ui_color.rb', line 13

def blue
  c = CGColorGetComponents(self.CGColor)
  c[2]
end

#greenObject



8
9
10
11
# File 'lib/swipe_action_cell/ui_color.rb', line 8

def green
  c = CGColorGetComponents(self.CGColor)
  c[1]
end

#redObject



3
4
5
6
# File 'lib/swipe_action_cell/ui_color.rb', line 3

def red
  c = CGColorGetComponents(self.CGColor)
  c[0]
end