Class: MotionKit::CALayerLayout
- Inherits:
-
TreeLayout
- Object
- BaseLayout
- TreeLayout
- MotionKit::CALayerLayout
- Defined in:
- lib/motion-kit-cocoa/layouts/calayer_layout.rb
Direct Known Subclasses
Instance Attribute Summary
Attributes inherited from BaseLayout
Instance Method Summary collapse
- #add_child(subview) ⇒ Object
-
#default_root ⇒ Object
platform specific default root view.
-
#layer ⇒ Object
a more appropriate name for the root layer.
- #remove_child(subview) ⇒ Object
Methods inherited from TreeLayout
#add, #all, #call_style_method, #create, #create_default_root_context, #first, #get, #initial, #last, #nth, #reapply, #reapply!, #remove, #root, #view, view
Methods inherited from BaseLayout
#add_deferred_block, #apply, #apply_with_context, #apply_with_target, #context, #deferred, #deferred_blocks, delegate_method_fix, #initialize, #ipad?, #iphone35?, #iphone4?, #iphone?, method_added, #method_missing, #orientation?, overridden_methods, override_start, override_stop, overrides, #retina?, #run_deferred, #set_layout, #target, #v
Methods included from BaseLayoutClassMethods
#layout_for, #memoize, #new_child, #target_klasses, #targets
Constructor Details
This class inherits a constructor from MotionKit::BaseLayout
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class MotionKit::BaseLayout
Instance Method Details
#add_child(subview) ⇒ Object
12 13 14 |
# File 'lib/motion-kit-cocoa/layouts/calayer_layout.rb', line 12 def add_child(subview) target.addSublayer(subview) end |
#default_root ⇒ Object
platform specific default root view
8 9 10 |
# File 'lib/motion-kit-cocoa/layouts/calayer_layout.rb', line 8 def default_root self.class.targets.layer end |
#layer ⇒ Object
a more appropriate name for the root layer
21 22 23 |
# File 'lib/motion-kit-cocoa/layouts/calayer_layout.rb', line 21 def layer self.view end |
#remove_child(subview) ⇒ Object
16 17 18 |
# File 'lib/motion-kit-cocoa/layouts/calayer_layout.rb', line 16 def remove_child(subview) subview.removeFromSuperlayer end |