Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kharauzov/cardsholder
Demonstration of complex interface layouts using child view controllers in iOS 🦾
https://github.com/kharauzov/cardsholder
animation cardview childviewcontroller interactive interface-design ios swift transition ui
Last synced: about 22 hours ago
JSON representation
Demonstration of complex interface layouts using child view controllers in iOS 🦾
- Host: GitHub
- URL: https://github.com/kharauzov/cardsholder
- Owner: Kharauzov
- License: mit
- Created: 2020-02-19T18:45:58.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2020-03-27T07:03:14.000Z (almost 5 years ago)
- Last Synced: 2024-01-20T18:04:45.686Z (12 months ago)
- Topics: animation, cardview, childviewcontroller, interactive, interface-design, ios, swift, transition, ui
- Language: Swift
- Homepage:
- Size: 26.4 MB
- Stars: 32
- Watchers: 1
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
![Swift](https://img.shields.io/badge/Swift-5.0-orange.svg)
![Platform](https://img.shields.io/badge/platform-iOS-lightgrey.svg)
[![License](https://img.shields.io/badge/license-mit-blue.svg)](https://doge.mit-license.org)## Sense
I created this project to demonstrate the power of **child view controllers** in iOS development. But in order to avoid boring and simple interfaces in this concept, I was using interactive views and custom transitions 😎
Please check attached video below, demonstrating how it works.* This project contains only pure Swift❤️
* No third-party frameworks and Pods.I wrote [an article](https://medium.com/@sergkharauzov/the-power-of-child-viewcontrollers-in-ios-da3d58f5a9fe) on Medium about child view controllers. You can find some code explanations from this project in that article too.
Here is [a shot](https://dribbble.com/shots/10833924-Cards-Holder-iOS-Control) on Dribbble.
## Presentation
### Key things:
1. `UIPanGestureRecognizer` for dragging cards.
2. `CADisplayLink` for accurate observing of frames changes in animations.
3. `UIView.animate{}` blocks for most of the animations.
4. `CABasicAnimation` for shadow layer.
5. `UIViewControllerTransitioningDelegate` for custom transition to Details scene.
6. All UI is made **programmatically**, thus it’s reusable. No xibs, no storyboards.### Structure of the screen
Here is a structure of main screen.
ProfileViewController - as a parent view controller, subclassed from `CardsHolderViewController`. It contains such child view controllers:1. ProfileShortInfoViewController (top part of the screen)
2. ProfileActivityViewController (activity card)
3. RecommendationsViewController (recommended card)
If you open recommended card, there will be such state for the screen:
Fully visible RecommendationsViewController, that contains tableView with cells, each of which holds child view controller subclassed from `RecommendationsSliderViewController`.### Feedback
If you have any questions or suggestions, feel free to open issue just at this project.### License
CardsHolder and all its classes are available under the MIT license. See the LICENSE file for more info.