适用于iOS的Objective-C中具有行和列的表 [英] Table with rows and columns in Objective-C for iOS
本文介绍了适用于iOS的Objective-C中具有行和列的表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何在Objective-C中实现具有行和列的表?我需要显示一个时间表:每周的列和小时的行.我不知道. TableView
创建行. UICollectionView
是否适合这个?
How can I implement a table with rows and columns in Objective-C? I need to show a timetable: columns for week's day and rows for hours. I have no idea. TableView
makes rows. Would UICollectionView
be right for this?
推荐答案
您可以使用 UITableView
.但是,您不必使用默认的 UITableViewCell
,而是必须创建一个自定义单元格,该单元格具有7个水平等距的标签.然后添加24行,每行一小时.我认为这就是您所需要的,简单而直接.
You can use UITableView
. But instead of using the default UITableViewCell
, you have to create a custom cell with 7 labels equally spacing horizontally. Then you add 24 rows, each for one hour. And I think that's all you need, simple and straight forward.
这篇关于适用于iOS的Objective-C中具有行和列的表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文