<分区>
众所周知,
collection view (UICollectionView), new in iOS 6, is a UIScrollView subclass that generalizes the notion of a UITableView. So I consider replace all my UITableView with UICollectionView.
在我看来,只使用 Collection View 是好的(我的意思是避免重复和不一致)
UITableViewCell
子类和
一些 UICollectionViewCell
子类,我们应该使用
UICollectionViewCell
仅限子类那么用 Collection View 替换所有 TableView 是好习惯吗?
最佳答案
我不敢苟同“用 Collection View 替换所有 TableView 是一种很好的做法”这一点。有很多很好的理由说明为什么我们在应用程序中的某些时候仍然需要 tableView。知识很少,让我试着把它们列在这里
在提供 InApp 设置时,我会选择 tableView 而不是 collectionView,因为它与设备中给定的默认设置对称。
如果我必须创建简单的 UI,在滚动界面中使用一些单列数据,我会选择 tableView,因为它很容易实现。
关于ios - 用 Collection View 替换所有 TableView 是好习惯吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21027456/
相关文章:
ios - 如何在使用 Appcelerator 的 Titanium 构建的 iOS native 应用程序中使用 janrain engage 小部件?
iphone - NSFetchedResultsChangeDelete 未被触发
ios - Collection View 单元格多项选择错误
ios - corebluetooth 读取 RSSI 错误 :The operation was cancelled
iphone - 我的 UIView 动画不稳定 - 如何优化以下代码?
ios - 从 NSArray 创建结构化 NSDictionary
ios - 故意在 UICollectionView 单元格内加载具有随机延迟的 imageview
objective-c - 更改 UITableViewCell 框架但没有用