http://www.oschina.net/p/scrolllayer

ScrollLayer

编辑/纠错

分享到: 
 
已用    +1
收藏 +12

4月18日 武汉 源创会开始报名,送华为开发板

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)响应有些迟滞。
  • 暂没有开发图片自动对准功能。

演示:http://www.smbey0nd.com/demo/lab/scrolllayer/demo.html

fictorial / ScrollLayer

Watch7 Fork1

2D scroll layer for cocos2d-iphone apps — More...

master分支代码最近更新:2012-05-12

下载zip

 
 

ScrollLayer 的 demo的连接貌似有问题,是个色情网站。。...

铂金小猪 发表于3年前 ,最后回答(3年前):红薯»

  • 4回答
  • 0投票
  • 279浏览

更多ScrollLayer的问题 »

 
 
 
 
https://github.com/fictorial/ScrollLayer
 

HTTPS clone URL

You can clone with HTTPS orSubversion.

Clone in DesktopDownload ZIP

2D scroll layer for cocos2d-iphone apps
Objective-CC
 branch: master 

Update README

latest commit a0eb9b95e3

 fictorial authored on May 12, 2012

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

 

HTTPS clone URL

You can clone with HTTPS orSubversion.

Clone in DesktopDownload ZIP

A scroll layer for cocos2d-ios lib for iphone.
Objective-CC
 branch: master 

Cocos2d scroll updated 

latest commit bfaa4cc7dd

 Igor Kotkovets authored on Nov 12, 2012
  src Cocos2d scroll updated 2 years ago

ScrollLayer的更多相关文章

  1. [翻译] JTNumberScrollAnimatedView

    JTNumberScrollAnimatedView 本人视频教程系类   iOS中CALayer的使用 效果: Use JTNumberScrollAnimatedView for have a n ...

  2. iOS核心动画高级技巧之图层变换和专用图层(二)

    iOS核心动画高级技巧之CALayer(一) iOS核心动画高级技巧之图层变换和专用图层(二)iOS核心动画高级技巧之核心动画(三)iOS核心动画高级技巧之性能(四)iOS核心动画高级技巧之动画总结( ...

  3. cocos2dx基础篇(14) 滚动视图CCScrollView

    [3.x]     (1)去掉 "CC"     (2)滚动方向         > CCScrollViewDirection 改为强枚举 ScrollView::Dire ...

  4. iOS之CAScrollLayer属性简介和使用

    1.CAScrollLayer的简介 CAScrollLayer用于显示一个滑动图层的一部分,可以确定滑动方向和可视区域面积,限制不滑出区域外!相关属性如下:其中 /* Scroll the cont ...

随机推荐

  1. 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 ...

  2. python基础之生成器、三元表达式、列表生成式、生成器表达式

    生成器 生成器函数:函数体内包含有yield关键字,该函数执行的结果是生成器,生成器在本质上就是迭代器. def foo(): print('first------>') yield 1 pri ...

  3. 邮件系统之Postfix与Dovecot

    电子邮件系统 电子邮件系统基于邮件协议来完成电子邮件的传输,常见的邮件协议有: 简单邮件传输协议(Simple Mail Transfer Protocol,SMTP):用于发送和中转发出的电子邮件, ...

  4. tomcat7 配置 https安全访问

    在apache-tomcat-7.0.33-windows-x64.zip配置https,结果在配置SSL时遇到一些问题 1.用JDK自带的keytool来生成私有密钥和自签发的证书,如下: keyt ...

  5. pdfmake实现中文支持,解决中文乱码问题

    引言:当初自己为了在项目中bootstrap-table中实现导出pdf,使用的pdfmake,但是pdfmake默认使用的不是中文字体,实现pdfmake使用中文字体主要就是编译新的vfs_font ...

  6. python ranndom模块及生成验证码

    python的random模块用于生成随机数,下面介绍一下random模块的常用方法: 取随机小数: 数学计算 random.random() 用于生成一个0-1的随机浮点数 0<=n<1 ...

  7. HTML中body相关标签-03

    今日主要内容: 列表标签 <ul>.<ol>.<dl> 表格标签 <table> 表单标签 <fom> 一.列表标签 列表标签分为三种. 1 ...

  8. Centos/linux开放端口

    在linux上部署tomcat发现外部无法访问可以通过两种方式解决: 1.关闭防火墙 service iptables stop(不推荐) 2.修改相关文件,开放需要开放的端口 (1)通过命令vi / ...

  9. 孤荷凌寒自学python第二十八天python的datetime.date模块

     孤荷凌寒自学python第二十八天python的datetime.date模块 (完整学习过程屏幕记录视频地址在文末,手写笔记在文末) 一.toordinal() 此方法将访问从公元1年1月1日至当 ...

  10. 异步fifo的设计(FPGA)

    本文首先对异步 FIFO 设计的重点难点进行分析 最后给出详细代码 一.FIFO简单讲解 FIFO的本质是RAM, 先进先出 重要参数:fifo深度(简单来说就是需要存多少个数据)           ...