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 ...
随机推荐
- poj 2965 枚举+DFS
The Pilots Brothers' refrigerator Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 25343 ...
- springboot搭建环境访问Controller层返回404
如果启动成功,但是却访问不了你自己写的controller,报404错误,那么原因就是您写的controller没有被spring 容器扫描到 解决方案: spring boot 默认扫描您的类是 在 ...
- git重新下载项目
file-new-project from version control - git 修改网址为需要的网址
- 牛客暑假多校第一场J-Different Integers
一.题目描述: 链接:https://www.nowcoder.com/acm/contest/139/JGiven a sequence of integers a1, a2, ..., an an ...
- 笔记-select,poll,epoll
笔记-select,poll,epoll 1. I/O多路复用 I/O多路复用是指:通过一种机制或一个进程,可以监视多个文件描述符,一旦描述符就绪(写或读),能够通知程序进行相应的读写操作. ...
- 常用数据库连接URL地址大全
1.Oracle8/8i/9i数据库(thin模式) Class.forName("oracle.jdbc.driver.OracleDriver").newInstance(); ...
- Django笔记 —— 模型
最近在学习Django,打算玩玩网页后台方面的东西,因为一直很好奇但却没怎么接触过.Django对我来说是一个全新的内容,思路想来也是全新的,或许并不能写得很明白,所以大家就凑合着看吧- 本篇笔记(其 ...
- jvm可视化工具jvisualvm插件——Visual GC
转自:http://blog.csdn.net/xuelinmei_happy/article/details/51090115 Visual GC是一个Java 内存使用分析与GC收集的可视化工具插 ...
- JMeter学习笔记(五) 文件上传接口测试
此次测试的是上传图片接口,我把测试情况整理了一下,其他的上传文件接口都类似. 1.我通过jmeter的录制功能获取到了接口地址以及相关参数,如果有接口文档就会方便很多,此步骤就不多做说明了 2.因为上 ...
- 孤荷凌寒自学python第六天 列表的嵌套与列表的主要方法
孤荷凌寒自学python第六天 列表的嵌套与列表的主要方法 (完整学习过程屏幕记录视频地址在文末,手写笔记在文末) (同步的语音笔记朗读:https://www.ximalaya.com/keji/1 ...

