Closed mstanislav closed 11 years ago
The best way probably is to subclass UITableViewCell and then set it via your table_data method:
UITableViewCell docs: http://developer.apple.com/library/ios/#documentation/uikit/reference/UITableViewCell_Class/Reference/Reference.html
Setting the custom cell type:
def table_data
[{
title: "My Header",
cells: [
{ title: "Something", cellClass: MyCustomTableViewCell, action: :some_action }
]
}]
end
NOTE: cellClass will become cell_class in ProMotion 0.4, coming out soon, like next week. cellClass will work but will be deprecated.
You can also use Teacup with ProMotion.
Thanks for the follow-ups! Really enjoying the gem.
No problem -- glad it's useful to you!
FYI, I inelegantly added a workaround for this in my case by adding: dataCell[:font_resize] ||= false tableCell.textLabel.adjustsFontSizeToFitWidth = dataCell[:font_resize]
That was all I really needed to accomplish!
Any hints on setting a font size for table cell data with promotion? Thanks!