Class: FirstController
- Inherits:
-
UIViewController
- Object
- UIViewController
- FirstController
- Defined in:
- app/controllers/first_controller.rb
Instance Method Summary collapse
- #messages ⇒ Object
- #next_message ⇒ Object
- #next_view ⇒ Object
- #shouldAutorotateToInterfaceOrientation(orientation) ⇒ Object
Methods inherited from UIViewController
#autorotateMask, #autorotateToOrientation, layout, #layoutDidLoad, #old_viewDidDisappear, #old_viewWillAppear, stylesheet, #stylesheet=, #top_level_view, #viewDidDisappear, #viewDidLoad, #viewWillAppear, #willAnimateRotationToInterfaceOrientation
Methods included from Teacup::Layout
#layout, #stylesheet, #stylesheet=, #subview
Instance Method Details
#messages ⇒ Object
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 |
# File 'app/controllers/first_controller.rb', line 31 def @messages ||= [ 'This is teacup', 'Welcome', 'This is teacup', 'Welcome to teacup', 'You can do anything at teacup', 'Anything at all', 'The only limit is yourself ', 'Welcome to teacup', 'Welcome to teacup', 'This is teacup', 'Welcome to teacup', 'This is teacup, Welcome', 'Yes, this is teacup', 'This is teacup and welcome to you who have come to teacup', 'Anything is possible at teacup', 'You can to anything teacup', 'The infinite is possible at teacup', 'The unattainable is unknown at teacup', 'Welcome to teacup', 'This is teacup', 'Welcome to teacup', 'Welcome', 'This is teacup', 'Welcome to teacup', 'Welcome to teacup', ] end |
#next_message ⇒ Object
19 20 21 22 23 24 25 26 27 28 29 |
# File 'app/controllers/first_controller.rb', line 19 def msg = .shift if msg @welcome.text = msg else @welcome.text = 'Next example...' @button.removeTarget(self, action: :next_view, forControlEvents:UIControlEventTouchUpInside) @button.addTarget(self, action: :next_view, forControlEvents:UIControlEventTouchUpInside) end end |
#next_view ⇒ Object
16 17 |
# File 'app/controllers/first_controller.rb', line 16 def next_view end |
#shouldAutorotateToInterfaceOrientation(orientation) ⇒ Object
61 62 63 |
# File 'app/controllers/first_controller.rb', line 61 def shouldAutorotateToInterfaceOrientation(orientation) autorotateToOrientation(orientation) end |