Sha256: 97be3f63e489434f8d5b513ff4f8993c8ec97bd75cc5d5418bb319d114aa7dec

Contents?: true

Size: 682 Bytes

Versions: 6

Compression:

Stored size: 682 Bytes

Contents

#
# The basic, grid (flow) layout. inheritable.
#
class Layout
  attr_reader :_

  def initialize(layout=nil)
    @_ = layout || UICollectionViewFlowLayout.alloc.init

    self.items_spacing = 0
    self.rows_spacing  = 1
  end

  def item_size
  end

  def item_size=(*size)
    size = UnderOs::Point.new(*size)
    @_.itemSize = CGSizeMake(size.x, size.y)
  end

  def items_spacing
    @_.minimumInteritemSpacing
  end

  def items_spacing=(value)
    @_.minimumInteritemSpacing = value
  end

  def rows_spacing
    @_.minimumLineSpacing
  end

  def rows_spacing=(value)
    @_.minimumLineSpacing = value
  end

  def section_inset
  end

  def section_inset=(value)
  end
end

Version data entries

6 entries across 6 versions & 2 rubygems

Version Path
under-os-ui-1.4.0 lib/under_os/ui/collection/layout.rb
under-os-1.3.0 lib/under_os/ui/collection/layout.rb
under-os-1.2.1 lib/under_os/ui/collection/layout.rb
under-os-1.2.0 lib/under_os/ui/collection/layout.rb
under-os-1.1.0 lib/under_os/ui/collection/layout.rb
under-os-1.0.0 lib/under_os/ui/collection/layout.rb