class PMXLColorChooser
Attributes
delegate[RW]
Public Instance Methods
color()
click to toggle source
# File lib/ProMotion/XLForm/cells/xl_form_color_selector_cell.rb, line 113 def color @color_picker.selectionColor end
color=(value)
click to toggle source
# File lib/ProMotion/XLForm/cells/xl_form_color_selector_cell.rb, line 108 def color=(value) @color_picker.setSelectionColor(value) @slider.value = @color_picker.brightness end
delegate=(value)
click to toggle source
# File lib/ProMotion/XLForm/cells/xl_form_color_selector_cell.rb, line 117 def delegate=(value) @delegate = value @color_picker.delegate = value end
initWithFrame(frame)
click to toggle source
Calls superclass method
# File lib/ProMotion/XLForm/cells/xl_form_color_selector_cell.rb, line 92 def initWithFrame(frame) super.tap do self.backgroundColor = UIColor.whiteColor picker_frame = CGRectInset(frame, 10, 10) picker_frame.size.height = picker_frame.size.width @color_picker = RSColorPickerView.alloc.initWithFrame picker_frame self.addSubview(@color_picker) slider_frame = [[10, CGRectGetMaxX(picker_frame) + 5], [CGRectGetWidth(picker_frame), 30]] @slider = PMXLBrightnessSlider.alloc.initWithFrame slider_frame @slider.color_picker = @color_picker self.addSubview(@slider) end end