Class: TestViewController

Inherits:
UITableViewController
  • Object
show all
Includes:
MotionTable::GroupedTable
Defined in:
app/app_delegate.rb

Instance Method Summary collapse

Methods included from MotionTable::GroupedTable

#tableView

Methods included from MotionTable::SectionedTable

#accessoryToggledSwitch, #cellAtSectionAndIndex, #createTableViewFromData, #numberOfSectionsInTableView, #sectionAtIndex, #sectionIndexTitlesForTableView, #setTableViewData, #tableView, #triggerAction, #updateTableViewData

Instance Method Details

#edit_profileObject



37
38
39
# File 'app/app_delegate.rb', line 37

def edit_profile
  return "edit_profile"
end

#popObject



44
45
46
# File 'app/app_delegate.rb', line 44

def pop
  self.navigationController.popViewControllerAnimated(true)
end

#pop_allObject



47
48
49
# File 'app/app_delegate.rb', line 47

def pop_all
  UIApplication.sharedApplication.delegate.initial_view
end

#push(view_class) ⇒ Object



40
41
42
43
# File 'app/app_delegate.rb', line 40

def push(view_class)
  view = view_class.alloc.initWithNibName(nil, bundle: nil)
  self.navigationController.pushViewController(view, animated: true)
end

#viewDidLoadObject



13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# File 'app/app_delegate.rb', line 13

def viewDidLoad
  super
  self.title = "GroupedTable"

  grouped_table_view_data = [
    {
      title: "Your Account",
      cells: [
        { title: "Edit Profile", action: :edit_profile },
        { title: "Log Out", action: :log_out },
      ]
    },
    {
      title: "Test",
      cells: [
        { title: "About", action: :something_here },
        { title: "Feedback", action: :something_here }
      ]
    }
  ]

  self.tableView = self.createTableViewFromData(grouped_table_view_data)
end