Class: MotionLayoutController

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

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

#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



12
13
14
15
16
17
18
19
20
# File 'app/controllers/motion_layout_controller.rb', line 12

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