ios 如何使用 UIScrollView 或 UITableView 设计和创建 GridView
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/5140710/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to design and create a GridView using UIScrollView or UITableView
提问by Jayson
I think GridView is a very common view in many situation. As a beginner in iOS, I just wonder why iOS didn't provide a GridView class. So here's my question, how to design and create a GridView using UIScrollView or UITableView? or is there some other solution to create a GridView?
我认为 GridView 在许多情况下是一个非常常见的视图。作为 iOS 的初学者,我只是想知道为什么 iOS 没有提供 GridView 类。所以这是我的问题,如何使用 UIScrollView 或 UITableView 设计和创建 GridView?或者是否有其他解决方案来创建 GridView?
回答by Michal K.
GitHub is the best place to search for open source solutions, so try to use it next time. Check DTGridViewor PF-GridView
GitHub 是搜索开源解决方案的最佳位置,所以下次尝试使用它。检查DTGridView或PF-GridView
回答by Kobski
This question has been asked before:
Grid view in iPhone SDK
之前有人问过这个问题:
iPhone SDK 中的网格视图
Personally I recommend AQGridView.
我个人建议AQGridView。
回答by fahmi ocha
You can use UICollectionView to create a nice gridview. It's simple to use. It is available in iOS 6.0 and later.
您可以使用 UICollectionView 创建一个漂亮的网格视图。使用起来很简单。它在 iOS 6.0 及更高版本中可用。
https://developer.apple.com/documentation/uikit/uicollectionview
https://developer.apple.com/documentation/uikit/uicollectionview
回答by user2453876
So I have been delving into this over the past few days and there are a few more options that I have found worthwhile (some of these other posters have already mentioned, but I am mentioning again for completeness):
所以在过去的几天里我一直在深入研究这个问题,还有一些我觉得值得的选择(其中一些其他海报已经提到,但我再次提到完整性):
https://github.com/AlanQuatermain/AQGridView(Free)
https://github.com/AlanQuatermain/AQGridView(免费)
http://ioscomponents.com/Home/Products(Commercial - lots of features 29 USD)
http://ioscomponents.com/Home/Products(商业 - 很多功能 29 美元)
https://www.developergarden.com/en/marketplace/components/details/cmp/ios-data-grid-table-view(commercial 129 USD)
https://www.developergarden.com/en/marketplace/components/details/cmp/ios-data-grid-table-view(商业 129 美元)
http://www.binpress.com/app/vertical-horizontal-scrolling-datagrid-for-ios/1082(Commercial 129 USD)
http://www.binpress.com/app/vertical-horizontal-scrolling-datagrid-for-ios/1082(商业版 129 美元)
Infragistics has one too: http://www.infragistics.com/products/iosUSD 295 (USD 995 if you want support).
Infragistics 也有:http: //www.infragistics.com/products/ios295 美元(如果您需要支持,则为 995 美元)。