https://github.com/peterprokop/cubiccube
CubicCube is a Swift GUI library for embedding view controllers on faces of cube (well, technically it's a parallelepiped, but we'll call it a cube)
https://github.com/peterprokop/cubiccube
carthage ios ios-ui swift swift4
Last synced: about 1 month ago
JSON representation
CubicCube is a Swift GUI library for embedding view controllers on faces of cube (well, technically it's a parallelepiped, but we'll call it a cube)
- Host: GitHub
- URL: https://github.com/peterprokop/cubiccube
- Owner: peterprokop
- License: mit
- Created: 2018-07-03T08:15:53.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2018-07-06T09:44:05.000Z (almost 7 years ago)
- Last Synced: 2025-04-09T23:51:56.717Z (about 1 month ago)
- Topics: carthage, ios, ios-ui, swift, swift4
- Language: Swift
- Homepage:
- Size: 2.81 MB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README

CubicCube is a Swift GUI library for embedding view controllers on faces of cube
(well, technically it's a parallelepiped, but we'll call it a cube)## Installation
### Manual
Just clone and add ```CubicViewController.swift``` to your project.### Carthage
* `touch Cartfile`
* `nano Cartfile`
* put `github "peterprokop/CubicCube"` into Cartfile
* Save it: `ctrl-x`, `y`, `enter`
* Run `carthage update`
* Copy `CubicCube.framework` from `Carthage/Build/iOS` to your project
* Make sure that `CubicCube` is added in `Embedded Binaries` section of your target (or else you will get `dyld library not loaded referenced from ... reason image not found` error)
* Add `import CubicCube` on top of your view controller's code### Cocoapods
Stop using this piece of crap. Seriously.## Requirements
- Xcode 9.4.1+
- Swift 4.1## Usage
Minimal working example is following:
```swift
import CubicCubeclass ViewController: CubicViewController {
required init(coder aDecoder: NSCoder) {
let makeViewController = { (color: UIColor) -> UIViewController in
let vc = UIViewController()
vc.view.backgroundColor = color
return vc
}super.init(
firstViewController: makeViewController(.red),
secondViewController: makeViewController(.green),
thirdViewController: makeViewController(.purple),
fourthViewController: makeViewController(.orange)
)
}
}
```Also please check example project in the repo.