{"id":18271245,"url":"https://github.com/skyfe79/leaves","last_synced_at":"2025-04-05T01:31:15.192Z","repository":{"id":137746388,"uuid":"1731479","full_name":"skyfe79/leaves","owner":"skyfe79","description":"An iBooks-like page-turning interface for iPhone and iPad apps using only public APIs.","archived":false,"fork":true,"pushed_at":"2010-12-09T18:16:24.000Z","size":3750,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-11-05T11:53:22.892Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://groups.google.com/group/leaves-developers","language":"Objective-C","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"brow/leaves","license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/skyfe79.png","metadata":{"files":{"readme":"README.markdown","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2011-05-11T03:57:51.000Z","updated_at":"2013-01-02T02:43:54.000Z","dependencies_parsed_at":"2023-04-05T18:04:02.008Z","dependency_job_id":null,"html_url":"https://github.com/skyfe79/leaves","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/skyfe79%2Fleaves","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skyfe79%2Fleaves/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skyfe79%2Fleaves/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skyfe79%2Fleaves/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/skyfe79","download_url":"https://codeload.github.com/skyfe79/leaves/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247276043,"owners_count":20912286,"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-11-05T11:39:10.658Z","updated_at":"2025-04-05T01:31:10.227Z","avatar_url":"https://github.com/skyfe79.png","language":"Objective-C","readme":"#Leaves\n\nLeaves is a simple way to present a page-turning interface similar to Apple's iBooks.  It comprises two classes, `LeavesView` and `LeavesViewController`, and occupies less than 100 kB compiled.  It uses only public APIs, sacrificing a portion of iBooks' visual flair to ensure that your application is safe for submission to the App Store.\n\nLeaves supports:\n\n- Text, images, PDFs -- anything that can be rendered in a graphics context\n- Drag or tap to turn the page\n- iPad- and iPhone-sized display areas \n\nLeaves does *not* currently support:\n\n- Interactive elements on the page\n- Swipe gestures\n- Two-page landscape view\n\nLeaves requires iPhone OS 3.0 or later.\n\n#Installation\n\nAdd the files in the `Leaves` subdirectory to your Xcode project and ensure that you are linking against `QuartzCore.framework`.\n\n#Getting Started\n\nCreating a page-turning interface is as simple as subclassing `LeavesViewController`:\n\n\t@interface ColorSwatchViewController : LeavesViewController\n\t@end\n\n...and implementing the `LeavesViewDataSource` protocol:\n\n\t@implementation ColorSwatchViewController\n\n\t- (NSUInteger) numberOfPagesInLeavesView:(LeavesView*)leavesView {\n\t\treturn 10;\n\t}\n\n\t- (void) renderPageAtIndex:(NSUInteger)index inContext:(CGContextRef)ctx {\n\t\tCGContextSetFillColorWithColor(ctx, [[UIColor colorWithHue:index/10.0 \n\t\t\t\t\t\t\t\t\t\t\t\t\t\tsaturation:0.8\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tbrightness:0.8 \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t alpha:1.0] CGColor]);\n\t\tCGContextFillRect(ctx, CGContextGetClipBoundingBox(ctx));\n\t}\n\n\t@end\n\nFor more sophisticated examples, build the Xcode project included with Leaves.\n\n#Notes\n\nThe best way to get an answer to your question about programming with Leaves is the [Leaves Developers mailing list](http://groups.google.com/group/leaves-developers), which I keep an eye on.  But if you find a bug, be sure to visit the [tracker](http://github.com/brow/leaves/issues) or message me directly.","funding_links":[],"categories":["etc"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskyfe79%2Fleaves","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fskyfe79%2Fleaves","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskyfe79%2Fleaves/lists"}