Sha256: b6cbbd2d3fd3a37205e09a24580e23d2c0cc0ff31ea7fa48843ea985108cfa89

Contents?: true

Size: 539 Bytes

Versions: 1

Compression:

Stored size: 539 Bytes

Contents

module ProMotion
  module ScreenElements
    include ProMotion::ViewHelper
    
    def add(v, attrs = {})
      if attrs && attrs.length > 0
        set_attributes(v, attrs)
      end
      self.view.addSubview(v)
      v
    end
    alias :add_element :add
    alias :add_view :add

    def remove(v)
      v.removeFromSuperview
      v = nil
    end
    alias :remove_element :remove
    alias :remove_view :remove

    def bounds
      return self.view.bounds
    end
    
    def frame
      return self.view.frame
    end

  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ProMotion-0.5.2 lib/ProMotion/screen_helpers/screen_elements.rb