{"id":15561311,"url":"https://github.com/1caxz/cardviewlist","last_synced_at":"2025-04-23T22:41:27.935Z","repository":{"id":56905664,"uuid":"110545415","full_name":"1Caxz/CardViewList","owner":"1Caxz","description":"An elegant and responsive CardView like Android on iOS with Swift. Available horizontal and vertical scrolling with full animations and customizable.","archived":false,"fork":false,"pushed_at":"2018-01-22T11:16:42.000Z","size":17822,"stargazers_count":34,"open_issues_count":2,"forks_count":10,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-06T10:44:33.696Z","etag":null,"topics":["android","android-ui","cardview","cardview-demo","cardview-ios","cardview-library","cardview-list","cardview-swift","ios","ios-lib","ios-library","ios-ui","library","like-android","podfile","scrolling","similar-android","swift","swift-library","swift4"],"latest_commit_sha":null,"homepage":"https://github.com/icaksama/CardViewList","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/1Caxz.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}},"created_at":"2017-11-13T12:27:40.000Z","updated_at":"2024-10-24T08:36:58.000Z","dependencies_parsed_at":"2022-08-20T19:20:26.449Z","dependency_job_id":null,"html_url":"https://github.com/1Caxz/CardViewList","commit_stats":null,"previous_names":["1caxz/cardviewlist","icaksama/cardviewlist"],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1Caxz%2FCardViewList","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1Caxz%2FCardViewList/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1Caxz%2FCardViewList/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1Caxz%2FCardViewList/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/1Caxz","download_url":"https://codeload.github.com/1Caxz/CardViewList/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250528683,"owners_count":21445511,"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":["android","android-ui","cardview","cardview-demo","cardview-ios","cardview-library","cardview-list","cardview-swift","ios","ios-lib","ios-library","ios-ui","library","like-android","podfile","scrolling","similar-android","swift","swift-library","swift4"],"created_at":"2024-10-02T16:07:23.098Z","updated_at":"2025-04-23T22:41:27.913Z","avatar_url":"https://github.com/1Caxz.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CardViewList\n[![Creator](https://img.shields.io/badge/creator-icaksama-green.svg)](https://www.linkedin.com/in/icaksama/)\n[![Travis](https://img.shields.io/travis/icaksama/CardViewList.svg)](https://travis-ci.org/icaksama/CardViewList)\n[![GitHub license](https://img.shields.io/github/license/icaksama/CardViewList.svg)](https://raw.githubusercontent.com/icaksama/CardViewList/master/LICENSE)\n[![Code Size](https://img.shields.io/github/languages/code-size/icaksama/CardViewList.svg)](https://cocoapods.org/pods/CardViewList)\n[![Pod Version](https://img.shields.io/cocoapods/v/CardViewList.svg)](https://cocoapods.org/pods/CardViewList)\n[![Platform](https://img.shields.io/cocoapods/p/CardViewList.svg)](https://cocoapods.org/pods/CardViewList)\n[![Download Total](https://img.shields.io/cocoapods/dt/CardViewList.svg)](https://cocoapods.org/pods/CardViewList)\n\u003cbr\u003e\nCreate CardView like Android easier on iOS. This library provides horizontal and vertical scrolling with many features inside.\n\n## Features\n- [x] Support swift 4 and iOS 8 above\n- [x] Suport vertical and horizontal scrolling\n- [x] CardView can be customized\n- [x] CardView shandow\n- [x] Clickable CardView\n- [x] Multi touch CardView\n- [x] Responsive design\n- [x] Awesome scrolling and touch animation\n- [x] EASY TO USE \u0026 FAST!\n\n## Preview\n\u003cp align=\"center\"\u003e\n\u003cimg width=\"450\" src=\"https://github.com/icaksama/CardViewList/blob/master/iPadResponsive.gif?raw=true\"\u003e\u0026nbsp;\u0026nbsp;\u0026nbsp;\n\u003cimg width=\"350\" src=\"https://github.com/icaksama/CardViewList/blob/master/iPhoneResponsive.gif?raw=true\"\u003e\n\u003c/p\u003e\n\n## Add to Podfile\nAdd CardViewList library to your Podfile and install.\n```text\npod 'CardViewList', '~\u003e 1.1.8'\n```\n\n## Import Library\nAdd import CardViewList library in your class before use this library.\n```swift\nimport CardViewList\n```\n\n## Add CardViewListDelegete\nAdd \u003cb\u003eCardViewListDelegete\u003c/b\u003e in your Class/ViewController\n```swift\nclass ViewController: UIViewController, CardViewListDelegete {\n```\n\n## Add Method Delegete\nMethod delegete is optional. But you can add them to your code for detecting some condition for your programs. Please define the method depend on CardView from UIView/UIViewController.\n```swift\n// Response when CardView will Display.\nfunc cardView(willDisplay scrollView: UIScrollView, identifierCards identifier: String) {}\n\n// Response when every single of CardView from UIView will attach.\nfunc cardView(_ scrollView: UIScrollView, willAttachCardView cardView: UIView, identifierCards identifier: String, index: Int) {}\n\n// Response when every single of CardView from UIViewController will attach.\nfunc cardView(_ scrollView: UIScrollView, willAttachCardViewController cardViewController: UIViewController, identifierCards identifier: String, index: Int) {}\n\n// Response when CardView from UIView did finish attached.\nfunc cardView(_ scrollView: UIScrollView, didFinishDisplayCardViews cardViews: [UIView], identifierCards identifier: String) {}\n\n// Response when CardView from UIViewController did finish attached.\nfunc cardView(_ scrollView: UIScrollView, didFinishDisplayCardViewControllers cardViewsController: [UIViewController], identifierCards identifier: String) {}\n\n// Response when CardView is selected.\nfunc cardView(_ scrollView: UIScrollView, didSelectCardView cardView: UIView, identifierCards identifier: String, index: Int) {}\n```\n\n## Create CardView List with UIViewControler\nFirst, You need to create your UIViewControler as CardView. You can see the demo project.\nMake sure run this program inside viewDidAppear for best appearance. \u003cb\u003e\"identifier\"\u003c/b\u003e will let you create more than one CardView list in one page and detect it with the identifier.\n```swift\nfileprivate var cardViewList: CardViewList!\noverride func viewDidAppear(_ animated: Bool) {\n    super.viewDidAppear(animated)\n    self.cardViewList = CardViewList()\n    self.cardViewList.delegete = self\n    \n    // Create CardView List from UIViewController\n    var cardViewControllers = [UIViewController]()\n    for _ in 1 ... 25 {\n        cardViewControllers.append(CardViewController(nibName: \"CardViewController\", bundle: nil))\n    }\n    self.cardViewList.animationScroll = .transformToBottom\n    self.cardViewList.isClickable = true\n    self.cardViewList.clickAnimation = .bounce\n    self.cardViewList.grid = 1\n    self.cardViewList.generateCardViewList(containerView: self.view, viewControllers: cardViewControllers, listType: .horizontal, identifier: \"CardWithUIViewController\")\n}\n```\n\n## Create CardView List with UIView\nFirst, You need to create your Views as CardView. You can see in the demo project.\nMake sure run this program inside viewDidAppear for best appearance. \u003cb\u003e\"identifier\"\u003c/b\u003e will let you create more than one CardView list in one page and detect it with the identifier.\n```swift\nfileprivate var cardViewList: CardViewList!\noverride func viewDidAppear(_ animated: Bool) {\n    super.viewDidAppear(animated)\n    self.cardViewList = CardViewList()\n    self.cardViewList.delegete = self\n    \n    // Create CardView List from UIView\n    var cardViews = [UIView]()\n    for _ in 1 ... 25 {\n        cardViews.append(UIView(frame: CGRect(x: 0, y: 0, width: 150, height: 150)))\n    }\n    self.cardViewList.animationScroll = .scaleBounce\n    self.cardViewList.isClickable = true\n    self.cardViewList.clickAnimation = .bounce\n    self.cardViewList.cardSizeType = .autoSize\n    self.cardViewList.grid = 1\n    self.cardViewList.generateCardViewList(containerView: self.view, views: cardViews, listType: .vertical, identifier: \"CardWithUIView\")\n}\n```\n\n## CardView Setting\nSetting the CardView before generate CardView List.\n```swift\n/** Set disable/enable shadow of CardView. Default is true */\ncardViewList.isShadowEnable = true\n    \n/** Set disable/enable click of CardView. Default is false */\ncardViewList.isClickable = false\n    \n/** Set multiple touch of CardView. Default is false */\ncardViewList.isMultipleTouch = false\n    \n/** Set corner radius of card view in pixel. Default is 12.0 */\ncardViewList.cornerRadius = 12.0\n    \n/** Set shadow size of card view in pixel. Default is 5.0 */\ncardViewList.shadowSize = 5.0\n    \n/** Set shadow opacity of card view in 0 - 1. Default is 0.9 */\ncardViewList.shadowOpacity = 0.9\n    \n/** Set shadow color of card view. Default color is black */\ncardViewList.shadowColor = UIColor.black\n    \n/** Set CardView margin in percent(%) of containerView. Default is 5 */\ncardViewList.margin = 5\n    \n/** Set margin between CardView in percent(%) of containerView. Default is 5 */\ncardViewList.marginCards = 5\n    \n/** Set list type horizontal, vertical, horizontalVertical. Default is vertical */\ncardViewList.listType = .vertical\n    \n/** Set grid List of CardView. Default is 1 */\ncardViewList.grid = 1\n    \n/** Set size of CardView. Default is autoSize */\ncardViewList.cardSizeType = .autoSize\n    \n/** Set max width of CardView in percent(%) of containerView. Default is 100 */\ncardViewList.maxWidth = 100\n    \n/** Set max height of CardView in percent(%) of containerView. Default is 100 */\ncardViewList.maxHeight = 100\n    \n/** Set animation when CardView showing. Default is none */\ncardViewList.animationScroll = .none\n    \n/** Set animation click for CardView. Default is none */\ncardViewList.clickAnimation = .none\n```\n\n## List of AnimationScroll Types\nThere are many animation scrolls. You can use them for your CardView list. The animation will start when CardView is visible to the user when scrolling.\n- [x] none\n- [x] scaleBounce\n- [x] transformToRight\n- [x] transformToLeft\n- [x] transformToBottom\n- [x] transformToTop\n\n## List of CardSize Types\nThere are three CardSize type.\n- [x] autoSize : CardView size will generated from library.\n- [x] square   : CardView size will be generated to square shape depend by width or height containerView that lower.\n- [x] circle   : CardView size will be generated to square circle depend by width or height containerView that lower.\n\n## MIT License\n```text\nCopyright (c) 2017 Saiful Irham Wicaksana\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F1caxz%2Fcardviewlist","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F1caxz%2Fcardviewlist","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F1caxz%2Fcardviewlist/lists"}