Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Efraim Budusan authored Feb 16, 2021
1 parent 1435472 commit ee7123a
Showing 1 changed file with 20 additions and 40 deletions.
60 changes: 20 additions & 40 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
[![Twitter](https://img.shields.io/badge/[email protected]?style=flat)](http://twitter.com/Tapptitude)

## About
Lightweight library to and example project to build beautiful parallaxing onbaording slides.
Lightweight library to and example project to build beautiful parallaxing onbaording slides. Achive onboarding slides that have depth effect when in motion in a few simple steps.

This project is maintained by Tapptitude, a mobile app development agency specialized in building high-quality iOS and Android mobile apps, for startups and brands alike. A lively team of skilled app developers and app designers based in Europe, we provide full-stack mobile app development services to entrepreneurs looking to innovate on mobile.

Expand All @@ -20,58 +20,38 @@ This project is maintained by Tapptitude, a mobile app development agency specia

## Installation

_CocoaPods_
#### Swift Package Manager

_Swift 5.0_
`Xcode` > `File` > `Swift Packages` > `Add Package Dependency...` > `Paste` `https://github.com/tapptitude/TTParallaxOnboarding`

```ruby
pod 'TTFortuneWheel'
```

_Swift 4.2_

```ruby
pod 'TTFortuneWheel', '~>0.1.6'
```
#### Manually

_Swift 4.0_
Add the contents of Sources/TTParallaxOnboarding folder to your project.

```ruby
pod 'TTFortuneWheel', '~>0.1.5'
```
## Usage

_Carthage_
Best way to understand how to use the library is to clone and open the example project.

```
github "tapptitude/TTFortuneWheel-iOS"
```
1. Build your art view in a single container view but keep the slides organized into a horizontal stack view. See `OboardingView` in the example project.

_Manually_
2. Create an `TTParallaxScrollView` either from code using the interface builder.

Add contents of TTFortuneWheel folder to your project.
3. Add the art view to the scrollview

## Usage
```swift
let onboardingView = OnboardingView()
scrollView.set(contentView: onboardingView, pageCount: 3)
}
```

You can place the FortuneWheel in your storyboard or add it as sa subview programatically.
4. Assign a depth to each of your layer view. The depth value needs to be betwen 0.0 and 1.0. The greater the value is the farther and object will be when scrolling. For example some distant mountains would be 0.9 and somehting just in front of the scene will be 0.0 (this will scroll at the same rate with the ScrollView).

```swift

override func viewDidLoad() {
super.viewDidLoad()

let slices = [ FortuneWheelSlice(title: "Slice 1"),
FortuneWheelSlice(title: "Slice 2"),
FortuneWheelSlice(title: "Slice 3")]

let fortuneWheel = TTFortuneWheel(frame: frame, slices:slices)
spinningWheel.equalSlices = true
self.view.addSubview(fortuneWheel)
}
self.scrollView.addParallax(to: onboardingView.rocket, depth: 0.4)
self.scrollView.addParallax(to: onboardingView.mountain, depth: 0.7)
```
## How to customize?
If you want something to reamin stationary assign it the value of 1.0.

In order to provide custom drawing for slices you have to implement `FortuneWheelSliceProtocol`.
or can use the preconfiugred `FortuneWheelSliceImpl` class.

## Contribution

Expand All @@ -80,4 +60,4 @@ Feel free to Fork, submit Pull Requests or send us your feedback and suggestions

## License

TTFortuneWheel is available under the MIT license. See the LICENSE file for more info.
TTParallaxOnboarding is available under the MIT license. See the LICENSE file for more info.

0 comments on commit ee7123a

Please sign in to comment.