{"id":2533,"url":"https://github.com/seedante/CardAnimation","last_synced_at":"2025-08-03T00:31:57.039Z","repository":{"id":69635228,"uuid":"43898033","full_name":"seedante/CardAnimation","owner":"seedante","description":"Card flip animation by pan gesture.","archived":false,"fork":false,"pushed_at":"2021-01-20T11:55:02.000Z","size":2542,"stargazers_count":1175,"open_issues_count":0,"forks_count":127,"subscribers_count":29,"default_branch":"master","last_synced_at":"2024-11-29T06:37:52.204Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/seedante.png","metadata":{"files":{"readme":"README.md","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,"governance":null,"roadmap":null,"authors":null}},"created_at":"2015-10-08T15:21:25.000Z","updated_at":"2024-11-21T06:36:27.000Z","dependencies_parsed_at":"2023-04-22T21:47:33.156Z","dependency_job_id":null,"html_url":"https://github.com/seedante/CardAnimation","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/seedante%2FCardAnimation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seedante%2FCardAnimation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seedante%2FCardAnimation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seedante%2FCardAnimation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/seedante","download_url":"https://codeload.github.com/seedante/CardAnimation/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228510719,"owners_count":17931756,"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-01-05T20:16:16.137Z","updated_at":"2024-12-06T18:30:32.266Z","avatar_url":"https://github.com/seedante.png","language":"Swift","funding_links":[],"categories":["UI"],"sub_categories":["Cards","Other free courses"],"readme":"# CardAnimation\n\n[Design from Dribble](https://dribbble.com/shots/1265487-First-shot-in-Chapps-Animation).\n![Design from Dribble](https://upload-images.jianshu.io/upload_images/37334-a93069b40b9a83d6.gif?imageMogr2/auto-orient/strip|imageView2/2/w/800)\n\n[实现思路在这里](http://www.jianshu.com/p/286222d4edf8)。\n\n## Two Solutions\n\nAt the begin, I didn't encapsulate code, [@luxorules](https://github.com/luxorules/CardAnimation/tree/Component) refactor code into class and improve it to support not only image, then I encapsulate my code\ninto class. So, there are two choices.\n\n#### CardContainerView by seedante\n\nHere is [CardContainerView API reference](https://seedante.github.io/CardAnimation/Classes/CardContainerView.html). [CardContainerView](https://github.com/seedante/CardAnimation/blob/master/Classes/CardContainerView.swift) supports custom card size, pan gesture. \n\nExample:\n\t\n\tlet cardContainerView = CardContainerView(frame: aFrame)// with defalut card size.\n\tcardContainerView.dataSource = id\u003cCardContainerDataSource\u003e\n\t\nDone.\n\n    public protocol CardContainerDataSource: class{\n        func numberOfCards(for cardContainerView: UICardContainerView) -\u003e Int\n        func cardContainerView(_ cardContainerView: UICardContainerView, imageForCardAt index: Int) -\u003e UIImage?\n    }\n\n\n#### CardAnimationView by @luxorules\n\n[CardAnimationView](https://github.com/seedante/CardAnimation/blob/master/Classes/CardAnimationView.swift) supports custom card size, pan gesture. \n\nUsage is simple also:\n\n    let cardAnimationView = CardAnimationView.init(frame: aFrame)// with defalut card size.\n    cardAnimationView.dataSourceDelegate = id\u003cCardAnimationViewDataSource\u003e\n\nIt adds a little complexity to exchange for: custom card view(not only image).\n\n    protocol CardAnimationViewDataSource : class {\n        func numberOfVisibleCards() -\u003e Int\n        func numberOfCards() -\u003e Int\n        // Return view displayed in the CardAnimationView. If reusedView is not nil,\n        // you could configure and return it to reuse it.\n        func cardNumber(number:Int, reusedView:BaseCardView?) -\u003e BaseCardView\n    }\n\nClasses:\n\n- CardAnimationView: UIView, the view to display a list of card view.\n- BasedCardView: UIView, all custom card view must be inherited from this class. \n- ImageCardView: BasedCardView, child class of BasedCardView, if you just want to use image, use this class.\n\n## Requirements\n\n* iOS 8.0/Swift 4.0\n\n## Installation\n\nTwo solutions are both single file. They are in `Classes` folder. Just need to import file into your project.\n\n## Other\n\nThe project is released under the [MIT LICENSE](https://github.com/seedante/CardAnimation/blob/master/LICENSE). And relative technical points are moved to [wiki](https://github.com/seedante/CardAnimation/wiki/CardAnimation-Technical-Point).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseedante%2FCardAnimation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fseedante%2FCardAnimation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseedante%2FCardAnimation/lists"}