iphone - 如何实现带有行和列的表格

标签 iphone ios uitableview

如何实现如图所示的表格?有行和列的表?谁能告诉我 iphone 的引用

enter image description here

最佳答案

这些柱子只是一个幻象。

这是通过子类化 UITableViewCell 并将单元格设计为具有一个 UIImageView 和三个 UILabels 来完成的。

将 imageView 和标签分配给子类的属性,您可以这样配置......

Object *object = [self.datasource objectAtIndexPath:indexPath];

cell.imageView.image = object.image;
cell.subCategoryLabel.text = object.subcategory;
cell.dateLabel.text = object.dateString;
cell.scoreLabel.text = [NSString stringWithFormat:@"%i", object.score];

或者类似的东西。

然后标签的布局给人一种有列的错觉。

关于iphone - 如何实现带有行和列的表格,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13489274/

相关文章:

iphone - iOS SDWebImage 在 UITableViewCell 中淡入淡出

ios - 核心数据添加关系作为唯一约束 - iOS

ios - 用于本地化的 UITableView 单元格中的镜像

ios - 编辑 tableView,其中行是不可变值

iphone - 将 iOS 联系人同步到应用程序数据库(使用什么作为标识符引用?)

iphone - “sharedDispatcher”已弃用

iphone - iOS扑克牌

iphone - 如何以模态方式呈现标准的 UIViewController

ios - 在 Objective-C 中使用两个参数调用 void 函数

ios - 在 iOS8+ 上使用 AutoLayout 的自定大小的 TableView 单元格内的可变高度 CollectionView