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 ...
随机推荐
- Codeforces Round #459 (Div. 2) D. MADMAX DFS+博弈
D. MADMAX time limit per test 1 second memory limit per test 256 megabytes input standard input outp ...
- 通过集群的方式解决基于MQTT协议的RabbitMQ消息收发
在完成了基于AMQP协议的RabbitMQ消息收发后,我们要继续实现基于MQTT协议的RabbitMQ消息收发. 由于C#的RabbitMQ.Client包中只实现了基于AMQP协议的消息收发功能的封 ...
- Windows Server 远程桌面连接不上问题解决
关于Windows Server 远程桌面连接不上的问题需要从服务.端口.防火墙这几方面进行检查: 服务器上需要 开启的服务: - Remote Access Auto Connection Mana ...
- 9.1 mysql+centos7+主从复制
MYSQL(mariadb) MariaDB数据库管理系统是MySQL的一个分支,主要由开源社区在维护,采用GPL授权许可.开发这个分支的原因之一是:甲骨文公司收购了MySQL后,有将MySQL闭源的 ...
- RSA 加解密算法详解
RSA 为"非对称加密算法".也就是加密和解密用的密钥不同. (1)乙方生成两把密钥(公钥和私钥).公钥是公开的,任何人都可以获得,私钥则是保密的. (2)甲方获取乙方的公钥,然后 ...
- python语法re.compile模块介绍
1. re模块是正则表达式模块,re模块中包含一个重要函数是compile(pattern [, flags]) ,该函数根据包含的正则表达式的字符串创建模式对象.可以实现更有效率的匹配. impor ...
- WPF调用摄像头
添加程序集:WPFMediaKit.dll 更关键代码如下: 界面设计代码如下: <Window x:Class="摄像头调用.MainWindow" xmlns=" ...
- python中os.path.join和join的区别
这两个函数都是python的系统函数,都有“组合”.“连接”之意,但用法和应用场景千差万别 函数说明: 1.join函数 用法:用于连接字符串数组.将字符串.元组.列表中的元素以指定的字符(即分隔符) ...
- ZOJ 3724 Delivery 树状数组好题
虽然看起来是求最短路,但因为条件的限制,可以转化为区间求最小值. 对于一条small path [a, b],假设它的长度是len,它对区间[a, b]的影响就是:len-( sum[b]-sum[a ...
- Learn the shell
learn the shell what is the shell? when we speak of the command line,we are really to the shell.Actu ...