Class: Layout

Inherits:
Object
  • Object
show all
Defined in:
lib/under_os/ui/collection/layout.rb

Overview

The basic, grid (flow) layout. inheritable.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(layout = nil) ⇒ Layout

Returns a new instance of Layout.



7
8
9
10
11
12
# File 'lib/under_os/ui/collection/layout.rb', line 7

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

  self.items_spacing = 0
  self.rows_spacing  = 1
end

Instance Attribute Details

#_Object (readonly)

Returns the value of attribute _.



5
6
7
# File 'lib/under_os/ui/collection/layout.rb', line 5

def _
  @_
end

Instance Method Details

#item_sizeObject



14
15
# File 'lib/under_os/ui/collection/layout.rb', line 14

def item_size
end

#item_size=(*size) ⇒ Object



17
18
19
20
# File 'lib/under_os/ui/collection/layout.rb', line 17

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

#items_spacingObject



22
23
24
# File 'lib/under_os/ui/collection/layout.rb', line 22

def items_spacing
  @_.minimumInteritemSpacing
end

#items_spacing=(value) ⇒ Object



26
27
28
# File 'lib/under_os/ui/collection/layout.rb', line 26

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

#rows_spacingObject



30
31
32
# File 'lib/under_os/ui/collection/layout.rb', line 30

def rows_spacing
  @_.minimumLineSpacing
end

#rows_spacing=(value) ⇒ Object



34
35
36
# File 'lib/under_os/ui/collection/layout.rb', line 34

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

#section_insetObject



38
39
# File 'lib/under_os/ui/collection/layout.rb', line 38

def section_inset
end

#section_inset=(value) ⇒ Object



41
42
# File 'lib/under_os/ui/collection/layout.rb', line 41

def section_inset=(value)
end