BWHorizontalTableView 1.0.1

BWHorizontalTableView 1.0.1

测试已测试
语言语言 Obj-CObjective C
许可 MIT
发布最新版本2016年1月

BurrowsWang维护。



  • BurrowsWang

BWHorizontalTableView 是一个基于 Objective-c 开发的、与 UITableView 使用和界面相同的高效水平表格视图。

如何使用

API 文档可在 CocoaDocs - BWHorizontalTableView 获取。

可以在这里找到示例项目。如果您知道如何在您的 iOS 项目中使用 UITableView,您就已经知道如何使用 BWHorizontalTableView

首先,您应该提供水平表格视图的 dataSourcedelegate

BWHorizontalTableView *tableView = [[BWHorizontalTableView alloc] init];
tableView.frame = rect;
tableView.dataSource = your-data-source;
tableView.delegate = your-delegate;

您的数据源应该符合 BWHorizontalTableViewDataSource 并实现以下方法:

- (NSInteger)numberOfSectionsInHorizontalTableView:(BWHorizontalTableView *)tableView;

- (NSInteger)horizontalTableView:(BWHorizontalTableView *)tableView
        numberOfColumnsInSection:(NSInteger)section;

- (BWHorizontalTableViewCell *)horizontalTableView:(BWHorizontalTableView *)tableView
                          cellForColumnAtIndexPath:(NSIndexPath *)indexPath;

您的代理对象应该符合 BWHorizontalTableViewDelegate 并根据您的需求实现 协议 BWHorizontalTableViewDelegate 中定义的方法。

- (CGFloat)horizontalTableView:(BWHorizontalTableView *)tableView
     widthForColumnAtIndexPath:(NSIndexPath *)indexPath;

- (void)horizontalTableView:(BWHorizontalTableView *)tableView
 didSelectColumnAtIndexPath:(NSIndexPath *)indexPath;

安装

其他方式

  • 将所有文件复制到您的项目中
  • 将项目作为动态框架引入,PS:请将框架添加到 Embedded Binaries
  • 将项目作为静态库引入,PS:请将 -ObjC 添加到构建设置中 Other Linker Flags

许可

所有源代码均受 MIT 许可许可。