Class: MotionKit::CAGradientLayerHelpers

Inherits:
CALayerHelpers show all
Defined in:
lib/motion-kit-cocoa/helpers/cagradientlayer_helpers.rb

Direct Known Subclasses

CAGradientLayerLayout

Instance Attribute Summary

Attributes inherited from BaseLayout

#parent

Instance Method Summary collapse

Methods inherited from CALayerHelpers

#_calculate_frame, #above, #add_child, #after, #before, #below, #bottom, #center, #center_x, #center_y, #default_root, #frame, #from_bottom, #from_bottom_left, #from_bottom_right, #from_center, #from_left, #from_right, #from_top, #from_top_left, #from_top_right, #height, #layer, #origin, #relative_to, #remove_child, #right, #size, #width, #x, #y

Methods inherited from TreeLayout

#add, #all, #all_views, #always, #build, #built?, #child_layouts, #create, #create_default_root_context, #first, #forget, #forget_tree, #forget_view, #get, #get_view, #initial, #initial?, #initialize, #last, #last_view, #name_element, #nearest, #next, #nth, #nth_view, #prev, #reapply, #reapply!, #reapply?, #reapply_blocks, #remove, #remove_view, #root, #run_reapply_blocks, view, #view

Methods inherited from BaseLayout

#add_deferred_block, #apply, #apply_with_context, #apply_with_target, #context, #deferred, #deferred_blocks, delegate_method_fix, #has_context?, #initialize, #ipad?, #iphone35?, #iphone47?, #iphone4?, #iphone55?, #iphone?, #is_parent_layout?, #method_missing, #objc_version, #orientation?, #orientation_block, #parent_layout, #retina?, #ruby_version, #run_deferred, #set_parent_layout, #target, #tv?, #v

Methods included from BaseLayoutClassMethods

#layout_for, #memoize, #target_klasses, #targets

Constructor Details

This class inherits a constructor from MotionKit::TreeLayout

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class MotionKit::BaseLayout

Instance Method Details

#colors(values) ⇒ Object



8
9
10
# File 'lib/motion-kit-cocoa/helpers/cagradientlayer_helpers.rb', line 8

def colors(values)
  target.colors = values.map { |color| color.is_a?(MotionKit.color_class) ? color.CGColor : color }
end