{"id":16456579,"url":"https://github.com/jashmenn/shapes-panels","last_synced_at":"2025-03-21T05:30:47.494Z","repository":{"id":66246103,"uuid":"894012","full_name":"jashmenn/shapes-panels","owner":"jashmenn","description":"paged uiscrollview with cocos2d used in Jacob's Shapes","archived":false,"fork":false,"pushed_at":"2011-04-07T04:32:10.000Z","size":1122,"stargazers_count":67,"open_issues_count":2,"forks_count":14,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-17T22:06:53.059Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://www.littlehiccup.com","language":"Objective-C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jashmenn.png","metadata":{"files":{"readme":"README.mkd","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.cocos2d","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2010-09-07T16:00:00.000Z","updated_at":"2019-11-16T05:46:54.000Z","dependencies_parsed_at":"2023-02-20T00:45:48.390Z","dependency_job_id":null,"html_url":"https://github.com/jashmenn/shapes-panels","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jashmenn%2Fshapes-panels","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jashmenn%2Fshapes-panels/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jashmenn%2Fshapes-panels/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jashmenn%2Fshapes-panels/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jashmenn","download_url":"https://codeload.github.com/jashmenn/shapes-panels/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244745651,"owners_count":20503043,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-11T10:26:32.143Z","updated_at":"2025-03-21T05:30:47.159Z","avatar_url":"https://github.com/jashmenn.png","language":"Objective-C","funding_links":[],"categories":["etc"],"sub_categories":[],"readme":"# Paging UIScrollView with Previews in Cocos2D\n\nThis project shows how to create a paged UIScrollView with Previews\nin Cocos2D. It looks like this ([video](http://www.youtube.com/watch?v=2IgbRzGfBHk\u0026fmt=22))\n![iPhone Preview](https://github.com/jashmenn/shapes-panels/raw/master/Resources/iphone-preview.jpg)\n\n[Watch the video!](http://www.youtube.com/watch?v=2IgbRzGfBHk\u0026fmt=22)\n\n# The Problem\n\nApple's UIScrollView paging doesn't support an arbitrary width argument. If you\nmake a UIScrollView with a width smaller than the whole screen, then that view\nwon't capture touches outside of that area.\n\nAdditionally, we are mixing Cocoa views and Cocos2d/OpenGL, and how they interact is\nnot always obvious.  \n\n# Basic Idea\n\nWe create a subclass of `CCMenu` and add panels as items. The `CCMenu` is scrolled\nas the `UIScrollView` is scrolled. The `UIScrollView` is set to be smaller than\nthe whole screen: this gives us previews on either side of the current page.\nWe create a full-screen `TouchDelegatingView` under the `UIScrollView` and use\nthat to delegate touches that lie outside the `UIScrollView`.\n\nThere are a few custom classes mixed in, but that is the basic idea.\n\n![Panels Layers](https://github.com/jashmenn/shapes-panels/raw/master/Resources/shapes-panels-post.jpg)\n\n# Setup\n\nThis project uses cocos2d as a referenced project. You can see that in \n\n    Project \u003e Edit Project Settings \u003e User Header Search Paths\n\nwe have the environment variable `$(COCOS2D_SRC)`. You set up this variable in:\n\n    Xcode \u003e Preferences \u003e Source Trees \n\nThen hit the plus '+' and add a variable `COCOS2D_SRC` to point to your cocos2d installation.\n\n# Credits\n\nWritten by Nate Murray for [Jacob's Shapes](http://www.littlehiccup.com), an\niPhone game for toddlers.\n\nIt uses ideas and code from the following sites:\n\n *   [http://getsetgames.com/2009/08/21/cocos2d-and-uiscrollview/](http://getsetgames.com/2009/08/21/cocos2d-and-uiscrollview/)\n *   [http://blog.proculo.de/archives/180-Paging-enabled-UIScrollView-With-Previews.html](http://blog.proculo.de/archives/180-Paging-enabled-UIScrollView-With-Previews.html)\n \n\n# CHANGELOG\n\n2010-09-17 - fixed how ios 4.1 deals with canceling touches\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjashmenn%2Fshapes-panels","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjashmenn%2Fshapes-panels","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjashmenn%2Fshapes-panels/lists"}