Skip to content
No description, website, or topics provided.
Objective-C M C Other
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
AScrollLayerDemo
.gitignore
AScrollLayer.h
AScrollLayer.m
LICENSE.md
README.md

README.md

AScrollLayer

This is an attempt to create an open source alternative to UIScrollView by implementing it as a cocos2d layer. The idea is to make it fully featured (e.g. rubber band, smooth scrolling).

How to use

  • Add AScrollLayer as a child to the scene
  • Disable one of the axis (temporary solution)
  • Add CCNodes to AScrollLayer's 'contentLayer'-property
  • Define the contentSize of AScrollLayer

Current Features

  • Scrolling either vertically or horizontally (buggy when enabled at the same time)
  • Deceleration
  • Bounce when hitting edge
  • Rubber band effect when dragging beyond bounds

TODO

  • Make scrolling more natural by defining deceleration using physics -- it's linear right now
  • Subtle bounce back when hitting edge whilst dragging
  • Remove stuttering of content when pulling content beyond bounds (rubber band)
  • Counter-force when pulling content beyond bounds (i.e. content translates less and less due to rubber band)
  • Let bounds of content restrict scrolling instead of verticalScrollDisabled/horizontalScrollDisabled booleans(lazy)

Bugs

Contributing

You know you want to =)

You can’t perform that action at this time.