我正在使用 RubyMotion 和 ProMotion gem 开发 iOS 应用程序。如何使用 ProMotion 创建自定义表格单元格?如果我使用内置的表格屏幕,我只能使用默认的 iOS 样式,这不是很有帮助。
我添加了这个在不使用 ProMotion 时有效的功能。但是,当我在 ProMotion 屏幕上使用它时,它不会触发:
def tableView(tableView, cellForRowAtIndexPath:indexPath)
...
end
我正在使用 RubyMotion 和 ProMotion gem 开发 iOS 应用程序。如何使用 ProMotion 创建自定义表格单元格?如果我使用内置的表格屏幕,我只能使用默认的 iOS 样式,这不是很有帮助。
我添加了这个在不使用 ProMotion 时有效的功能。但是,当我在 ProMotion 屏幕上使用它时,它不会触发:
def tableView(tableView, cellForRowAtIndexPath:indexPath)
...
end
Promotion has its own mechanism to create table cells.
Have you read this ? https://github.com/clearsightstudio/ProMotion/wiki/API-Reference:-ProMotion::TableScreen#table_data
You should be able to do what you need :-)
EDIT:
Here is an example to customize the UITableView colors as well as the UITableViewCells.
I use the following to eloquently create custom cells, with custom labels without relying on subview which seems kind of jenky. I then use Pixate to style them.