Skip to content

Instantly share code, notes, and snippets.

@ryanabel03
Last active December 21, 2015 02:48
Show Gist options
  • Save ryanabel03/6237260 to your computer and use it in GitHub Desktop.
Save ryanabel03/6237260 to your computer and use it in GitHub Desktop.
class LoginViewController < UIViewController
include Objection::Compose
compose_with :login_table_view_model
#A stylesheet for all the styles in this controller
stylesheet :login_screen
def viewDidLoad
super
@table_view_controller = UITableViewController.alloc.initWithStyle UITableViewStyleGrouped
@table_view_controller.tableView.dataSource = self.login_table_view_model
@table_view_controller.tableView.delegate = self.login_table_view_model
#Create a UIScrollView subview and add a UITableView into it as a subview
@scroll_view = subview UIScrollView, :scroll_view do
subview @table_view_controller.tableView, :table_view
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment