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.

  • 相关阅读:
    hibernate连接MySQL配置hibernate.cfg.xml
    行百里者半九十 —— 查找算法
    行百里者半九十 —— 链表(1)
    行百里者半九十 —— 查找算法(中等)
    行百里者半九十 —— 字符串
    设计模式 —— 总结
    并发编程 —— 使用条件变量构建线程安全队列
    行百里者半九十 ——栈与队列
    设计模式 —— 命令模式
    css选择器中:firstchild与:firstoftype的区别
  • 原文地址:https://www.cnblogs.com/YouXianMing/p/4252535.html
Copyright © 2011-2022 走看看