Skip to content

Instantly share code, notes, and snippets.

@markrickert
Created September 2, 2013 13:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save markrickert/6412953 to your computer and use it in GitHub Desktop.
Save markrickert/6412953 to your computer and use it in GitHub Desktop.
Example on how to set the background color/view of a ProMotion GroupedTableScreen
class StatesScreen < PM::TableScreen
title "States"
def will_appear
view.backgroundView = nil
view.backgroundColor = UIColor.redColor
end
def table_style
UITableViewStyleGrouped
end
def table_data
[{
title: "",
cells: State.all.map { |state| { title: state.name, action: :tapped_state } }
}]
end
def tapped_state(args={})
PM.logger.debug args
end
end
@markrickert
Copy link
Author

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment