{"id":13628804,"url":"https://github.com/honcheng/PaperFoldGallery","last_synced_at":"2025-04-17T04:32:27.696Z","repository":{"id":6758180,"uuid":"8004779","full_name":"honcheng/PaperFoldGallery","owner":"honcheng","description":"PaperFoldGallery for iOS ","archived":false,"fork":false,"pushed_at":"2013-06-12T07:39:44.000Z","size":3821,"stargazers_count":358,"open_issues_count":0,"forks_count":60,"subscribers_count":28,"default_branch":"master","last_synced_at":"2025-04-10T01:09:22.374Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/honcheng.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-02-04T09:50:51.000Z","updated_at":"2025-02-06T21:37:16.000Z","dependencies_parsed_at":"2022-09-18T08:32:05.988Z","dependency_job_id":null,"html_url":"https://github.com/honcheng/PaperFoldGallery","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/honcheng%2FPaperFoldGallery","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/honcheng%2FPaperFoldGallery/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/honcheng%2FPaperFoldGallery/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/honcheng%2FPaperFoldGallery/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/honcheng","download_url":"https://codeload.github.com/honcheng/PaperFoldGallery/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249315990,"owners_count":21249868,"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-08-01T22:00:57.741Z","updated_at":"2025-04-17T04:32:22.688Z","avatar_url":"https://github.com/honcheng.png","language":"Objective-C","funding_links":[],"categories":["Uncategorized","Objective-C","etc"],"sub_categories":["Uncategorized"],"readme":"PaperFoldGallery \n================\n\nPaperFoldGallery displays multiple views in a paginated UIScrollView, but uses PaperFold library to animate to the next view. \n\nPaperFoldGallery is used in the Walkthrough pages of [Dispatch: Action-Based Email](https://itunes.apple.com/us/app/dispatch-action-based-email/id642022747?mt=8) App. \n\n\u003cimg width=300 src=\"https://github.com/honcheng/PaperFoldGallery/raw/master/Screenshots/demo.gif\"/\u003e \u003cimg width=320 src=\"https://github.com/honcheng/PaperFoldGallery/raw/master/Screenshots/dispatch-1.PNG\"/\u003e \n\nHow it works\n-----------\n\nThe first level is a paginated UIScrollView that displays views in each page. The second level contains 2 PaperFold views that are folded/unfolded/hidden depending on the scroll view offset. These views show a folded screenshot of the views below it, and are hidden once the UIScrollView snaps to page. \n\nThe subviews can be any UIView subclasses, so it can be static view, or other views like UITableView. \n\nThe library takes a screenshot often to get the state of the view below it. If you are using static views, you can improve the unfolding performance by providing screenshots.\n\nUsage\n-----\n# HCPaperFoldGalleryView\n\n### initWithFrame:folds:\nInitialize the gallery view\n\n    - (id)initWithFrame:(CGRect)frame folds:(int)folds\n\n#### Parameters\n##### frame\nThis value specifies the size of the frame\n##### folds\nThis value specifies number of folds \n\n### reloadData\nReloads content in the gallery view\n\n    - (void)reloadData\n\n### bouncesToHintNextPage\nBounces the view to the left slightly to show the next fold on the right\n\n    - (void)bouncesToHintNextPage\n\n### setPageNumber:animated:\nChanges the current page\n\n   - (void)setPageNumber:(int)pageNumber animated:(BOOL)animated\n\n#### Parameters\n##### pageNumber\nThis value specifies the page number to change to\n##### animated\nThis value specifies whether the page change should be animated \n\n### setPageNumber:animated:completed:\n\n    - (void)setPageNumber:(int)pageNumber animated:(BOOL)animated completed:(void(^)())block\n\n#### Parameters\n##### pageNumber\nThis value specifies the page number to change to\n##### animated\nThis value specifies whether the page change should be animated \n##### block\nThis block is called when the animation is complete\n\n# HCPaperFoldGalleryViewDelegate\n\n### paperFoldGalleryView:viewAtPageNumber:\nA non-optional method. Ask the delegate for cells at each page.\n\n    - (HCPaperFoldGalleryCellView*)paperFoldGalleryView:(HCPaperFoldGalleryView*)galleryView viewAtPageNumber:(int)pageNumber\n\n#### Parameters\n##### galleryView\nThe gallery view that requests for cell views\n##### pageNumber\nThe page number requested\n\n### paperFoldGalleryView:didScrollToPageNumber:\nNotifies the delegate when page changes\n\n    - (void)paperFoldGalleryView:(HCPaperFoldGalleryView *)galleryView didScrollToPageNumber:(int)pageNumber;\n\n#### Parameters\n##### galleryView\nThe gallery view where the page change happens\n##### pageNumber\nThe page number of the new page after scrolling \n\n# HCPaperFoldGalleryViewDatasource\n\n### numbeOfItemsInPaperFoldGalleryView:\nRequests dataSource for number if items to be displayed in the galleyView\n\n    - (NSInteger)numbeOfItemsInPaperFoldGalleryView:(HCPaperFoldGalleryView*)galleryView\n\n#### Parameters\n##### galleryView\nThe gallery view that will display the views\n\n### paperFoldGalleryView:imageAtPageNumber:\nAn optional method. Requests dataSource for UIImage to be displayed in the views' folds. If nil is returned, the library will take a screenshot automatically each time before folding. If a UIImage is returned, the library will use the image without taking screenshots (for better performance).\n\n    - (UIImage*)paperFoldGalleryView:(HCPaperFoldGalleryView*)galleryView imageAtPageNumber:(int)pageNumber\n\n#### Parameters\n##### galleryView\nThe gallery view that will display the views\n##### pageNumber\nThe page number of the requested UIImage\n\n\nRequirements\n-----------\n\nThis project uses ARC. If you are not using ARC in your project, add '-fobjc-arc' as a compiler flag for all the files in this project.\nXCode 4.4 is required for auto-synthesis.\n\nContact\n------\n\n[twitter.com/honcheng](http://twitter.com/honcheng)\n[honcheng.com](http://honcheng.com)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhoncheng%2FPaperFoldGallery","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhoncheng%2FPaperFoldGallery","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhoncheng%2FPaperFoldGallery/lists"}