RTParallaxController 1.0.7

RTParallaxController 1.0.7

测试已测试
语言语言 Obj-CObjective C
许可协议 MIT
发布上次发布2015 年 6 月

Rishabh Tayal 维护。



  • StefanLage

SLParallaxController

创建一个 UITableView 和 MapView 之间的视差效果,就像 FourSquare 中的视图。

demo

示例用法可在 SLAppDelegate 中找到。

要求

SLParallaxController 使用 ARC 并且需要 iOS 7.0+。适用于 iPhone 和 iPad。
需要框架 MapKit

安装

手动

SLParallaxController 文件夹复制到您的项目中。

使用

SLParallaxControllerUIViewController 的子类,因此您只需要创建一个新实例,如下所示:[SLParallaxController new]

自定义

您可以通过设置以下属性来自定义视图。

- heighTableViewHeader : Height of the visible map on high position

- Y_tableViewOnBottom : position of the TableView when it's down

- minYOffsetToReach : The minimum Y (TableView's contentOffset) 
                      to allow the 'displaying' of the map.

处理用户交互

在用户点击地图或 tableView 时,在 SLParallaxControllerDelegate 协议中定义的这些方法将被调用到代理上。

-(void)didTapOnMapView;
-(void)didTapOnTableView;

当 tableView 向下或向上移动时,这些方法将在代理中被调用。

-(void)didTableViewMoveDown;
-(void)didTableViewMoveUp;

许可协议

Copyright (c) 2014 stefanlage

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.