使UITableView看起来更像是“传统的”。表,有多列 [英] Making UITableView look more like a "conventional" table, with multiple columns

查看:44
本文介绍了使UITableView看起来更像是“传统的”。表,有多列的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个非常标准的 UITableView ,但是我想把它改成看起来像iOS开发之外的普通表 - 让它有更多列(但只有一行)并使单元格成方形。

我想要制作更多的表(每个单元格一个)然后将它们放在一起,但那不会是这样的方便。

I have a pretty much standard UITableView, but I would like to change it to look like what would be considered a normal table outside iOS development -- make it have more columns (but just one row) and make the cells square-shaped.
I thought about making more tables (one for every cell) and then placing them next to each other, but that wouldn't be so convenient.

是否有一种简单的方法可以让细胞在前一种细胞的右边而不是下面?

推荐答案

使用一些允许你拥有网格视图的第三方类。

Use some third-party classes that allows you to have "Grid Views".

一个是我的 OHGridView 类,另一个是 NRGridView ,还有更多。如果您的应用需要与iOS4和/或iOS5兼容,则使用第三方类(或自己构建一个)是唯一的选择。

One is my OHGridView class, another is NRGridView, and there are many more. If your app needs to be compatible with iOS4 and/or iOS5, using a third party class (or building one yourself) is the only option.

在iOS6下,将会是其他一些允许你直接这样做的东西(iOS6仍然在NDA下,所以我们不能公开谈论它,但如果你有权访问它们,请阅读developer.apple.com网站上的API Diff文件)。因此,如果您的应用程序仅用于启动iOS6 +并且您不需要iOS5支持,那么这可能是解决方案,如果您有一个可以访问iPs6 SDK的开发者帐户,您应该阅读它。

Under iOS6, there will be some other stuff that allow you to do that directly (iOS6 still under NDA so we can't talk about it publicly yet, but go read the API Diff files in the developer.apple.com website if you have access to them). So if your app is intended to be compatible only starting iOS6+ and you don't need support for iOS5, this could be the solution and you should go read about it if you have a developer account with access to the iPs6 SDK.

这篇关于使UITableView看起来更像是“传统的”。表,有多列的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆