[翻译] PTEHorizontalTableView

简介:

PTEHorizontalTableView

Horizontal UITableView inspired by EasyTableView.

水平滚动的UITableView,灵感来自于EasyTableView.

Features - 特点

  • PTEHorizontalTableView wraps a UITableView rotated horizontally using a CGAffineTransform whose cells' content views are rotated back vertically.
  • PTETableViewDelegate very similar to the standard UITableViewDelegate with some method name such as tableView:widthForCellAtIndexPath:.
  • Support for standard scroll indicators, headers and footers.
  • Full Interface Builder support including creating Static/Prototype Cells using Storyboards.
  • PTEHorizontalTableView封装了一个UITableView,用CGAffineTransform在水平方向上进行了旋转,然后,它的cell的contentView经过了垂直方向的旋转后就又恢复正常显示了.
  • PTETableViewDelegate的代理方法与UITableViewDelegate的代理方法非常相似,你可以很方便的就能使用
  • 支持标准的指示器,headerViews以及footerViews.
  • 支持IB创建,或者是Storyboard创建.

Demo - 示例

A demo project is included in the repository.

你可以参考demo来了解使用方法.

Installation - 安装

Simply add pod 'PTEHorizontalTableView' to your CocoaPodsPodfile.

你只需要在你的CocoaPods的Podfile中加入以下一句话即可.

platform :ios, '5.0'

pod 'PTEHorizontalTableView'

Documentation - 文档

http://cocoadocs.org/docsets/PTEHorizontalTableView/

Usage - 使用

Simply implement the PTETableViewDelegate protocol:

你需要实现代理方法PTETableViewDelegate即可:

@protocol PTETableViewDelegate <NSObject>

- (NSInteger)tableView:(PTEHorizontalTableView *)horizontalTableView
numberOfRowsInSection:(NSInteger)section; - (UITableViewCell *)tableView:(PTEHorizontalTableView *)horizontalTableView cellForRowAtIndexPath:(NSIndexPath *)indexPath; @optional - (NSUInteger)numberOfSectionsInTableView:(PTEHorizontalTableView*)horizontalTableView; - (void)tableView:(PTEHorizontalTableView *)horizontalTableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath; - (UIView*)tableView:(PTEHorizontalTableView*)horizontalTableView viewForHeaderInSection:(NSInteger)section; - (UIView*)tableView:(PTEHorizontalTableView*)horizontalTableView viewForFooterInSection:(NSInteger)section; - (CGFloat)tableView:(PTEHorizontalTableView *)horizontalTableView widthForCellAtIndexPath:(NSIndexPath *)indexPath; @end 

License - 版权

Copyright 2014 Ernesto Rivera

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

目录
相关文章
|
XML Java Android开发
[翻译]IAdaptable是什么?
IAdaptable在Eclipse里是一个非常重要的接口。对于Eclipse开发老手来说,它就像异常处理和抽象类一样寻常;但是对新手而言,它却令人感到困惑和畏惧。这篇文章将向你解释IAdaptable到底是什么,以及它在Eclipse里起到的作用。
1177 0
|
iOS开发 Android开发 开发工具
|
存储 iOS开发 Perl
|
安全 开发工具 C#
|
Web App开发 定位技术 iOS开发
|
iOS开发 编译器 Go