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

https://github.com/vrgsoftua/smparallaxview


https://github.com/vrgsoftua/smparallaxview

Last synced: 4 months ago
JSON representation

Awesome Lists containing this project

README

          

#### [HIRE US](http://vrgsoft.net/)
# SMParallaxView
UIView container which applies parallax effect to its content.
You can Even achieve 3d effect if you use two containers, one atop another like on video below.


# Usage
This view works only in UIScrollView (like UICollectionView, UITableView etc).
Its also possible to achieve parallax scrolling in two directions simultaneously (of course, if your parent scrollView supports bi-directional scrolling)
*For a working implementation, Have a look at the Sample*
1. Add SMParallaxMultiView in UICollectionViewCell, UITableViewCell, UIScrollView, etc.
```
@IBOutlet weak var paralaxView: SMParallaxMultiView!
```
2. Set array of UIImage to SMParallaxMultiView:
```
paralaxView.images = dataSource[indexPath.row].images
```
# Customization
| Attribute | Description |
| ------------- | ------------- |
| isEnabledHorizontalParallax | Enables or disables horizontal parallax effect |
| isEnabledVerticaleParallax | Same as isEnabledHorizontalParallax but vertical |
| isInvertedHorizontalParallax | If true direction of the parallax effect will be opposite to scroll direction |
| isInvertedVerticaleParallax | Same as isInvertedHorizontalParallax but vertical |
| isNeedScaleContainerView | Defines whether scale need to be applied |
| parallaxScale | Scale value applied to the whole ParallaxView. Default is 1.5. Do nothing if isNeedScaleContainerView set to false |

#### Contributing
* Contributions are always welcome
* If you want a feature and can code, feel free to fork and add the change yourself and make a pull request