{"id":16429052,"url":"https://github.com/codeandweb/uikit-sprite-sheet-example","last_synced_at":"2026-01-30T19:02:55.198Z","repository":{"id":8497204,"uuid":"10105029","full_name":"CodeAndWeb/uikit-sprite-sheet-example","owner":"CodeAndWeb","description":"Demo project with loader code to display animations and images from a sprite sheet","archived":false,"fork":false,"pushed_at":"2023-09-25T07:24:13.000Z","size":981,"stargazers_count":32,"open_issues_count":6,"forks_count":11,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-06-06T15:04:53.179Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PLSQL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CodeAndWeb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2013-05-16T16:04:47.000Z","updated_at":"2023-09-20T14:16:16.000Z","dependencies_parsed_at":"2022-09-19T15:50:19.751Z","dependency_job_id":"846adf75-34d0-4929-bb95-9f1874163c4a","html_url":"https://github.com/CodeAndWeb/uikit-sprite-sheet-example","commit_stats":null,"previous_names":["codeandweb/uikit-sprite-sheet-example","codeandweb/uikit-texturepacker"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/CodeAndWeb/uikit-sprite-sheet-example","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodeAndWeb%2Fuikit-sprite-sheet-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodeAndWeb%2Fuikit-sprite-sheet-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodeAndWeb%2Fuikit-sprite-sheet-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodeAndWeb%2Fuikit-sprite-sheet-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CodeAndWeb","download_url":"https://codeload.github.com/CodeAndWeb/uikit-sprite-sheet-example/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodeAndWeb%2Fuikit-sprite-sheet-example/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28917454,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-30T16:37:38.804Z","status":"ssl_error","status_checked_at":"2026-01-30T16:37:37.878Z","response_time":66,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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-11T08:20:33.799Z","updated_at":"2026-01-30T19:02:55.182Z","avatar_url":"https://github.com/CodeAndWeb.png","language":"PLSQL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# TexturePacker UIKit Demo\n\n\nThis demonstration explains how TexturePacker can be used to create SpriteSheets for UIKit projects. The classes contained in this project allow you to easily play animations and display single frames.\n\nSee https://www.codeandweb.com/texturepacker/tutorials/uikit-animations-with-texturepacker\n\n## Creating the sprite sheets\n\nUse TexturePacker to create the sprite sheet - use the \"UIKit (Plist)\" - exporter\n\n\n## Using the sprite sheet\n\n### Loading data\n\nLoad the created .plist data file:\n\n    NSDictionary *spriteData = [CAWSpriteReader spritesWithContentOfFile:@\"spritesheet.plist\"];\n\nLoad the image:\n    \n    UIImage *texture = [UIImage imageNamed:@\"spritesheet.png\"];\n    \nCreate an animation layer:\n\n\t// create the layer\n    CAWSpriteLayer *animationLayer = [CAWSpriteLayer layerWithSpriteData:spriteData andImage:texture];\n\n\t// add it to the current view\n    [self.view.layer addSublayer:animationLayer];\n        \n    // start playing an animation (CapGuyWalk0000, CapGuyWalk0001,….)\n    // repeat animation \n    // framerate is 24 fps\n    [animationLayer playAnimation:@\"CapGuyWalk%04d\" withRate:24 andRepeat:INFINITY];\n\n\t// set the position \n    [animationLayer setPosition:CGPointMake(50, 80)];\n\nPlay animation, stop after first play and hide animation\n\n\t// play once\n\t[animationLayer playAnimation:@\"CapGuyWalk%04d\" withRate:24];\n\n\t// keep last frame after animation is over\n    [animationLayer setShowLastFrame:true];\n\nApply transformations (e.g. scaling)\n    \n    animationLayer.transform = CATransform3DMakeScale(0.5,0.5, 1.0);\n\nStop, play, resume:\n\n    [animationLayer pause];\n    [animationLayer resume];\n    [animationLayer stop];\n    \nDisplay single frame:\n\n\t// create layer\n\tCAWSpriteLayer *staticImageLayer = [CAWSpriteLayer layerWithSpriteData:spriteData andImage:texture];\n\t\n\t// add to view\n    [self.view.layer addSublayer:staticImageLayer];\n        \n    // set position\n    [staticImageLayer setPosition:CGPointMake(400, 200)];\n    \n    // set frame to display\n    [staticImageLayer showFrame:@\"Box2\"];    \n    ","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodeandweb%2Fuikit-sprite-sheet-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodeandweb%2Fuikit-sprite-sheet-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodeandweb%2Fuikit-sprite-sheet-example/lists"}