zoukankan      html  css  js  c++  java
  • [翻译] 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.

  • 相关阅读:
    《The One!》团队作业4:基于原型的团队项目需求调研与分析
    《TheOne团队》团队作业三:团队项目原型设计与开发
    《The One 团队》第二次作业:团队项目选题
    《The One!团队》第一次作业:团队亮相
    实验十 团队作业6:团队项目系统设计改进与详细设计
    易校园——项目系统设计与数据库设计
    易校园--项目需求分析
    软工实践——团队上机作业
    团队编程第一次作业
    《发际线总是和我作队》第六次作业:团队项目系统设计改进与详细设计
  • 原文地址:https://www.cnblogs.com/YouXianMing/p/4252535.html
Copyright © 2011-2022 走看看