{"id":13466636,"url":"https://github.com/james01/CardNavigation","last_synced_at":"2025-03-26T00:31:16.318Z","repository":{"id":56905657,"uuid":"324292417","full_name":"james01/CardNavigation","owner":"james01","description":"A navigation controller that displays its view controllers as an interactive stack of cards.","archived":false,"fork":false,"pushed_at":"2021-04-19T04:32:59.000Z","size":1371,"stargazers_count":48,"open_issues_count":0,"forks_count":4,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-16T13:01:46.790Z","etag":null,"topics":["card-appearance","cards","cocoapods","interactive","interruptible","ios","navigation","navigation-controller","swift","transition","uikit"],"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/james01.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":"2020-12-25T05:13:17.000Z","updated_at":"2024-05-25T23:25:06.000Z","dependencies_parsed_at":"2022-08-20T19:20:30.831Z","dependency_job_id":null,"html_url":"https://github.com/james01/CardNavigation","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/james01%2FCardNavigation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/james01%2FCardNavigation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/james01%2FCardNavigation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/james01%2FCardNavigation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/james01","download_url":"https://codeload.github.com/james01/CardNavigation/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245566095,"owners_count":20636390,"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":["card-appearance","cards","cocoapods","interactive","interruptible","ios","navigation","navigation-controller","swift","transition","uikit"],"created_at":"2024-07-31T15:00:47.566Z","updated_at":"2025-03-26T00:31:15.880Z","avatar_url":"https://github.com/james01.png","language":"Swift","funding_links":[],"categories":["Libs","UI [🔝](#readme)"],"sub_categories":["UI"],"readme":"\u003cimg src=\"https://raw.githubusercontent.com/james01/CardNavigation/main/Docs/Images/Icon.png\" width=\"180\" /\u003e\n\n# CardNavigation\n\n[![CocoaPods](https://img.shields.io/cocoapods/v/CardNavigation)](https://cocoapods.org/pods/CardNavigation)\n![Platform](https://img.shields.io/cocoapods/p/CardNavigation?logo=Apple)\n\nThe easiest way to turn a navigation controller into an interactive stack of cards.\n\n## Highlights\n\n- ✅ Fully interactive and interruptible\n- ✅ Works seamlessly with scroll views\n- ✅ Supports changes in orientation\n- ✅ Can be used with or without storyboards\n- ✅ Written entirely in Swift using standard UIKit components\n\n## Example\n\n\u003cimg src=\"https://raw.githubusercontent.com/james01/CardNavigation/main/Docs/Images/Screen.gif\" width=\"239\" /\u003e\n\n## Installation\n\n### CocoaPods\n\nTo install CardNavigation using [CocoaPods](https://cocoapods.org), add the following line to your `Podfile`:\n\n```ruby\npod 'CardNavigation', '~\u003e 1.1'\n```\n\n### Swift Package Manager\n\nTo install CardNavigation using the [Swift Package Manager](https://swift.org/package-manager/), add the following value to your `Package.swift`:\n\n```swift\ndependencies: [\n    .package(url: \"https://github.com/james01/CardNavigation.git\", .upToNextMajor(from: \"1.1.0\"))\n]\n```\n\n## Usage\n\n### Getting Started\n\nCardNavigation consists of a single class: `CardNavigationController`. It behaves like a standard `UINavigationController`.\n\nAt the top of the file where you'd like to use a `CardNavigationController`, import `CardNavigation`.\n\n```swift\nimport CardNavigation\n```\n\nCreate an instance of `CardNavigationController` the way you would a regular `UINavigationController`.\n\n```swift\nlet navController = CardNavigationController(rootViewController: SomeViewController())\n```\n\nWhen you push a view controller, it will automatically be displayed as an interactive card.\n\n```swift\nnavController.pushViewController(AnotherViewController(), animated: true)\n```\n\n### Background Color\n\nThe `CardNavigationController`'s `navigationBar` is transparent by default. This allows the controller's background color to show through.\n\nYou may want to change the background color to reflect the theme of your app.\n\n```swift\nnavController.view.backgroundColor = .systemTeal\n```\n\n### Card Appearance\n\nTo change the card appearance, create a custom view class.\n\n```swift\nimport UIKit\n\nclass MyCardBackgroundView: UIView {\n\n    override init(frame: CGRect) {\n        super.init(frame: frame)\n        backgroundColor = .white\n\n        layer.cornerRadius = 32\n        layer.maskedCorners = [.layerMinXMinYCorner, .layerMaxXMinYCorner]\n        layer.cornerCurve = .continuous\n\n        layer.borderColor = UIColor.black.cgColor\n        layer.borderWidth = 4\n    }\n\n    required init?(coder: NSCoder) {\n        fatalError(\"init(coder:) has not been implemented\")\n    }\n}\n```\n\nThen, create a subclass of `CardNavigationController` and override the `cardBackgroundViewClass` property to return your custom class.\n\n```swift\nimport UIKit\nimport CardNavigation\n\nclass MyCardNavigationController: CardNavigationController {\n\n    override var cardBackgroundViewClass: UIView.Type {\n        return MyCardBackgroundView.self\n    }\n}\n```\n\n## Author\n\nJames Randolph ([@jamesrandolph01](https://twitter.com/jamesrandolph01))\n\n## License\n\nCardNavigation is released under the MIT license. See [LICENSE](LICENSE) for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjames01%2FCardNavigation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjames01%2FCardNavigation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjames01%2FCardNavigation/lists"}