Created
September 2, 2013 13:38
-
-
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
thank you for this! :)