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. [Hdu1166]敌兵布阵(CQD分治)

    CQQ分治 Code #include <cstdio> #include <cstring> #define N 50010 struct info{ int x,p,v; ...

  2. WPF 加载等待动画

    原文:WPF 加载等待动画 版权声明:本文为博主原创文章,未经博主允许不得转载. https://blog.csdn.net/qq_29844879/article/details/80216587 ...

  3. 安测云验证有CTA问题

    背景: 现在所有的app 都需要通过工信部的审核.用户不同意之前,不能联网. 那么,我怎么知道自己的应用有没有联网呢?那么多sdk ,那么多代码?我怎么测试呢? 哈哈,我们测试给的方法真的很管用. l ...

  4. JavaScript获取时间

    var myDate = new Date();            console.log(myDate.getFullYear()); //获取完整的年份(4位,1970-????)       ...

  5. shell脚本获取网页快照并生成缩略图

    获取网页快照并生成缩略图可分两步进行: 1.获取网页快照 2.生成缩略图 获取网页快照 这里我们用 phantomjs 来实现.关于 phantomjs 的详细用法可参考官方网站. 1.安装 我的环境 ...

  6. 理解web缓存

    web缓存是web用于临时存储各种资源的一种技术. web缓存大概分两种,一种是前端缓存,另一种是后端端缓存. 前端缓存 浏览器缓存 浏览器自带的缓存机制. 比如说浏览器后退前进的动作,一般使用浏览器 ...

  7. selenium界面元素定位

    一.        Selenium界面元素定位 本文元素定位以das2为例 #导入包 from selenium import  webdriver #打开火狐驱动 driver=webdriver ...

  8. 不作伪分享者决定完整分享我自学Python3的全部过程细节

    不作伪分享者决定完整分享我自学Python3的全部过程细节   我不要作伪分享者 十六年前我第一次见到了电脑,并深深地爱上了它: 十二年前我第一次连上了网络,并紧紧地被它爱上. 十年前的网络是田园美景 ...

  9. C# http Post与Get方法控制继电器

    ---恢复内容开始--- using System; using System.Collections.Generic; using System.Linq; using System.Text; u ...

  10. ubuntu 16.04 安装grpc

    参考自:http://dreamlikes.cn/archives/555 ==== 其中在第四步,编译安装gRPC时, make 后,出现错误 /usr/bin/ld: warning: libpr ...