2

我正在使用 RubyMotion 和 ProMotion gem 开发 iOS 应用程序。如何使用 ProMotion 创建自定义表格单元格?如果我使用内置的表格屏幕,我只能使用默认的 iOS 样式,这不是很有帮助。

我添加了这个在不使用 ProMotion 时有效的功能。但是,当我在 ProMotion 屏幕上使用它时,它不会触发:

def tableView(tableView, cellForRowAtIndexPath:indexPath)

 ...

end
4

2 回答 2

8

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.

https://gist.github.com/Arkan/5662905

于 2013-05-22T10:09:57.293 回答
2

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.

https://gist.github.com/j-mcnally/5151e2cf5cbef290ed44

于 2013-12-07T21:12:07.483 回答