Class: MotionLayoutController

Inherits:
UIViewController show all
Defined in:
app/controllers/motion_layout_controller.rb

Defined Under Namespace

Classes: CustomContainer

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from UIViewController

#autorotateMask, #autorotateToOrientation, #top_level_view, #viewDidLoad, #willAnimateRotationToInterfaceOrientation

Methods included from Teacup::Controller

included, #stylesheet=, #teacupDidLoad

Methods included from Teacup::Layout

#auto, included, #layout, #stylesheet, #stylesheet=, #subview, #top_level_view

Instance Attribute Details

#containerObject (readonly)

Returns the value of attribute container.



5
6
7
# File 'app/controllers/motion_layout_controller.rb', line 5

def container
  @container
end

#label1Object (readonly)

Returns the value of attribute label1.



2
3
4
# File 'app/controllers/motion_layout_controller.rb', line 2

def label1
  @label1
end

#label2Object (readonly)

Returns the value of attribute label2.



3
4
5
# File 'app/controllers/motion_layout_controller.rb', line 3

def label2
  @label2
end

#label3Object (readonly)

Returns the value of attribute label3.



4
5
6
# File 'app/controllers/motion_layout_controller.rb', line 4

def label3
  @label3
end

Instance Method Details

#layoutDidLoadObject



14
15
16
17
18
19
20
21
22
23
24
# File 'app/controllers/motion_layout_controller.rb', line 14

def layoutDidLoad
  auto do
    metrics "margin" => 20, "top" => 100
    horizontal '|-margin-[label1]-margin-[label2(==label1)]-margin-|'
    horizontal '|-margin-[label3]-margin-|'
    horizontal '|-margin-[container]-margin-|'
    vertical '|-top-[label1]'
    vertical '|-220-[label3(==label1)]'
    vertical '|-320-[container(==label1)]'
  end
end