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. C语言进阶——goto 和 void 的分析08

    遭人遗弃的goto: 高手潜规则:禁止使用goto 项目经验:程序质量与goto的出现次数成反比 最后的判决:将goto打入冷宫 程序示例1:(goto副作用分析) #include <stdi ...

  2. DNS域名解析服务(bind)

    DNS(Domain Name System,域名系统): 用于管理和解析域名与IP地址对应关系的技术. 简单来说,就是能够接受用户输入的域名或IP地址,然后自动查找与之匹配(或者说具有映射关系)的I ...

  3. Java-JNA使用心得2

    自5月初第一次尝试使用Java封装调用C的dll之后,已经先后经历了3次小项目了. 上月末是最近的一次项目实际,任务来的急时间又少,还好在加班加点后还是完成了任务,并把第二次没有实现的功能给实现了(C ...

  4. Nodejs-异步操作

    1.阻塞 console.time('main');//代码计时器 //不断循环阻塞了代码的执行 for(var i=0;i<10000000;i++){ } console.timeEnd(' ...

  5. Lua语言中文手册 转载自网络

    Programming in LuaCopyright ® 2005, Translation Team, www.luachina.net Programming in LuaProgramming ...

  6. 【Linear Models for Binary Classification】林轩田机器学习基石

    首先回顾了几个Linear Model的共性:都是算出来一个score,然后做某种变化处理. 既然Linear Model有各种好处(训练时间,公式简单),那如何把Linear Regression给 ...

  7. 【Text Justification】cpp

    题目: Given an array of words and a length L, format the text such that each line has exactly L charac ...

  8. Dapper 学习笔记

    一.基础 1.Dapper代码就一个SqlMapper.cs文件, 前人测试Dapper速度较快 的Orm,读取速度接近IDataReader,超过DataTable. 2.a.下载地址 https: ...

  9. Monkey、Monkeyrunner之间的区别

    Monkey.Monkeyrunner之间的区别 一.Monkey Monkey是Android中的一个命令行工具,可以运行在模拟器里或实际设备中.它向系统发送伪随机的用户事件流(如按键输入.触摸屏输 ...

  10. python 读取数据库中文内容显示一堆问号

    需要在连接数据库时 设置编码格式 def select_db(self,db_name): self.conn = MySQLdb.connect( host = self.ip, port = se ...