Skip to content

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

License

Notifications You must be signed in to change notification settings

schmittsfn/AScrollLayer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

Showcase

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 =)

About

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

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages

No packages published

Languages