Sha256: b35f55f33aa5179900ff5a500c44b78057a0ec3021ab07d94b5040f890f7744c

Contents?: true

Size: 492 Bytes

Versions: 14

Compression:

Stored size: 492 Bytes

Contents

# @provides MotionKit::CALayerHelpers
# @requires MotionKit::TreeLayout
module MotionKit
  class CALayerHelpers < TreeLayout
    targets CALayer

    # platform specific default root view
    def default_root
      self.class.targets.layer
    end

    def add_child(subview)
      target.addSublayer(subview)
    end

    def remove_child(subview)
      subview.removeFromSuperlayer
    end

    # a more appropriate name for the root layer
    def layer
      self.view
    end

  end

end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
motion-kit-1.1.0 lib/motion-kit-cocoa/helpers/calayer_helpers.rb
motion-kit-1.0.3 lib/motion-kit-cocoa/helpers/calayer_helpers.rb
motion-kit-1.0.2 lib/motion-kit-cocoa/helpers/calayer_helpers.rb
motion-kit-1.0.1 lib/motion-kit-cocoa/helpers/calayer_helpers.rb
motion-kit-1.0.0 lib/motion-kit-cocoa/helpers/calayer_helpers.rb
motion-kit-0.18.0 lib/motion-kit-cocoa/helpers/calayer_helpers.rb
motion-kit-0.17.0 lib/motion-kit-cocoa/helpers/calayer_helpers.rb
motion-kit-0.16.0 lib/motion-kit-cocoa/helpers/calayer_helpers.rb
motion-kit-0.15.0 lib/motion-kit-cocoa/helpers/calayer_helpers.rb
motion-kit-0.14.2 lib/motion-kit-cocoa/helpers/calayer_helpers.rb
motion-kit-0.14.1 lib/motion-kit-cocoa/helpers/calayer_helpers.rb
motion-kit-0.14.0 lib/motion-kit-cocoa/helpers/calayer_helpers.rb
motion-kit-0.13.0 lib/motion-kit-cocoa/helpers/calayer_helpers.rb
motion-kit-0.12.0 lib/motion-kit-cocoa/layouts/calayer_helpers.rb