Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/terminatorover/RGStack

This UI attempts to capture the Quibi Card Stack and the associated User Interaction.
https://github.com/terminatorover/RGStack

card ios stack swift swiftui ui

Last synced: about 1 month ago
JSON representation

This UI attempts to capture the Quibi Card Stack and the associated User Interaction.

Awesome Lists containing this project

README

        

# RGStack

This UI attempts to capture the Quibi Card Stack and the associated User Interaction.

![Demo](RGStack.gif)

### Required
A View that conforms to the `ConfigurableCard` protocol

RGStack is available through [CocoaPods](http://cocoapods.org). To install it, simply add the following line to your Podfile:

```ruby
pod 'RGStack'
```

### Simplest Setup

```swift
import RGStack

struct ContentView: View {
let demos: [Demo]
var body: some View {
RGStack(data: demos, size: .init(width: 320, height: 530))//convenience initializer
}
}
```

### More configuration

Use the CardInfo, which is passed to the RGStack initializer, to control more aspects of the UI Layout
```swift
struct CardInfo {
let size: CGSize
let gapDistance: CGFloat
let minScaleForBackCard: CGFloat
let visibleFractionOfBottomCard: CGFloat
}
```

A full Demo is included in the `ContentView` of the Project.

## License
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)