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.

  • 相关阅读:
    js怎么通过逗号将string转换成数组
    设置mysql数据库为只读
    python 关于django 2.X from django.contrib.auth.views import login
    python Django2.X,报错 ‘learning_logs ’is not a registered namespace,如何解决?
    python django2.x报错No module named 'django.core.urlresolvers'
    python Django2.0如何配置urls文件
    VMware vSphere 组件和功能
    VMware vSphere Client的简单使用教程
    python 逻辑运算 ‘and’ ,'or' 在实战中的作用,代替if语句。
    python_urllib2:urlerror和httperror
  • 原文地址:https://www.cnblogs.com/YouXianMing/p/4252535.html
Copyright © 2011-2022 走看看