标签:
PTEHorizontalTableView
Horizontal UITableView inspired by EasyTableView.
水平滚动的UITableView,灵感来自于EasyTableView.
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:
.A demo project is included in the repository.
你可以参考demo来了解使用方法.
Simply add pod ‘PTEHorizontalTableView‘
to your CocoaPods‘ Podfile.
你只需要在你的CocoaPods的Podfile中加入以下一句话即可.
platform :ios, ‘5.0‘
pod ‘PTEHorizontalTableView‘
http://cocoadocs.org/docsets/PTEHorizontalTableView/
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
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.
标签:
原文地址:http://www.cnblogs.com/YouXianMing/p/4252535.html