ScrollLayer
http://www.oschina.net/p/scrolllayer
编辑/纠错
ScrollLayer 是一个用于 cocos2d-iphone 应用上的屏幕滚动组件。

兼容性:
兼容iOS(Mobile Safari)/Android(Webkit)/PC(IE除外),其它未考证
操作方法:
在所支持的Touch设备上,用手指按住图片区域,然后向右(或向下)华丽丽地一拖,随即松开手指。Yeah~
调用语法示例:
$('#J_Gallery').scrollLayer({
direction:'X', //方向。X代表水平方向,Y代表垂直方向
wrapEl:'.wrap', //外层容器。用来overflow遮罩的层
touchEl:'.holder', //touch层容器。用来包裹列表内层元素的层
childEl:'li', //内层元素。用来放图的层
margin:5, //间距。以实际元素间距为准
speed:0.95, //加速度。一般取0.9-1之间
prevent:true //阻止超链接默认事件
});
已知问题&待改进:
- 个别低配置Android设备上(HTC HERO G3)响应有些迟滞。
- 暂没有开发图片自动对准功能。
- 授权协议: MIT
- 开发语言: Objective-C
- 操作系统: iPhone/iPad/iPod
- 收录时间: 鉴客 -> 2010年07月19日
![]() |
ScrollLayer 的 demo的连接貌似有问题,是个色情网站。。...铂金小猪 发表于3年前 ,最后回答(3年前):红薯» |
|
| demo | 2 spaces to 4 spaces; sorry for the BS commit | 3 years ago | |
| doc | Update diagram to include contentOffset | 4 years ago | |
| src | 2 spaces to 4 spaces; sorry for the BS commit | 3 years ago | |
| .gitattributes | Fix demo bug | 4 years ago | |
| .gitignore | initial commit | 4 years ago | |
| README.md | Update README | 3 years ago |
README.md
ScrollLayer
A scrollable layer for cocos2d-iphone apps.
This is very simple and does not do much. I recommend you usehttps://github.com/cocos2d/cocos2d-iphone-extensions/tree/master/Extensions/CCScrollLayerinstead for real work.
Features
- scrolling in 2D;
- velocity ("inertial scrolling");
- clipping (your layer doesn't have to use the entire window bounds).
Compatibility
Developed against cocos2d-iphone v1.0.0rc3.
History
There is a chaotic thread about a scrolling layer implementation for cocos2d-iphone apps. There's a ton of patches and bug reports. I gave up trying to follow that thread and decided to code my own version.
Future
I plan on creating a simple UITableView-like layer based on this code.
Concepts

Author
Brian Hammond brian@fictorial.com (http://fictorial.com)
License
Copyright (c) 2011 Fictorial LLC.
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.
https://github.com/igorkotkovets/ios-cocos2d-scroll
| src | Cocos2d scroll updated | 2 years ago |
ScrollLayer的更多相关文章
- [翻译] JTNumberScrollAnimatedView
JTNumberScrollAnimatedView 本人视频教程系类 iOS中CALayer的使用 效果: Use JTNumberScrollAnimatedView for have a n ...
- iOS核心动画高级技巧之图层变换和专用图层(二)
iOS核心动画高级技巧之CALayer(一) iOS核心动画高级技巧之图层变换和专用图层(二)iOS核心动画高级技巧之核心动画(三)iOS核心动画高级技巧之性能(四)iOS核心动画高级技巧之动画总结( ...
- cocos2dx基础篇(14) 滚动视图CCScrollView
[3.x] (1)去掉 "CC" (2)滚动方向 > CCScrollViewDirection 改为强枚举 ScrollView::Dire ...
- iOS之CAScrollLayer属性简介和使用
1.CAScrollLayer的简介 CAScrollLayer用于显示一个滑动图层的一部分,可以确定滑动方向和可视区域面积,限制不滑出区域外!相关属性如下:其中 /* Scroll the cont ...
随机推荐
- C语言基础篇(三) 指针
导航: 1.指针 2. 数组 3. 结构体,共用体 4. 内存分布图 5. 段错误分析 ----->x<------------->x<---- ...
- [CodeForces954D]Fight Against Traffic(最短路)
Description 题目链接 Solution 从起点和终点分别做一次最短路并记录结果 枚举每一条可能的边判断 Code #include <cstdio> #include < ...
- PAT Basic 1057
1057 数零壹 给定一串长度不超过 105 的字符串,本题要求你将其中所有英文字母的序号(字母 a-z 对应序号 1-26,不分大小写)相加,得到整数 N,然后再分析一下 N 的二进制表示中有 ...
- java.lang.NoSuchMethodError: cn.makangning.test.dao.Users.getUserBirthday()Ljava/sql/Date;
有时候出现这种怪异的问题,是由于多个版本的class存在. 比如说:某个java编译成class后,放到classes下面,然后lib目录下,也有这个class所在的jar包,这样就导致classpa ...
- MySQL 5.7远程连接
将/etc/mysql/my.cnf中的bind_address那一行注释掉或修改为"bind_address=0.0.0.0": bind_address并没有在/etc/mys ...
- HTML中body相关标签-03
今日主要内容: 列表标签 <ul>.<ol>.<dl> 表格标签 <table> 表单标签 <fom> 一.列表标签 列表标签分为三种. 1 ...
- 如何将多个Eclipse项目导入IntelliJ IDEA
技术交流群:233513714 IntelliJ IDEA 与Eclipse在新建项目上的叫法略有不同,区别见下图. 当我们使用idea后再次使用eclipse时就会有很多不适,下面介绍一个多项目的导 ...
- Div处理滚动条问题
1,用div做容器现在已经十分普遍,下面是最基本的代码 <div style="width:50px;height:50px;background-color:blue"&g ...
- Maven学习 (三) 使用m2eclipse创建web项目
1.首先确认你的eclipse已经安装好m2eclipse的环境,可以参照上两篇Maven学习内容 2.新建一个maven的项目 3.下一步默认配置,使用默认的工作空间,或者你可以自己选择其他的空间 ...
- Linux 批量删除文件后缀
例子: [zengs@gene CASP9]$ lscasp9.ids T0526 T0538 T0550 T0562 T0574 T0586 T0598 T0610 T0622 T0634T0515 ...

