https://github.com/vrgsoftua/smparallaxview
https://github.com/vrgsoftua/smparallaxview
Last synced: 4 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/vrgsoftua/smparallaxview
- Owner: VRGsoftUA
- Created: 2018-06-12T12:36:42.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2018-06-12T13:00:09.000Z (about 8 years ago)
- Last Synced: 2025-08-23T12:33:02.038Z (10 months ago)
- Language: Swift
- Size: 14.8 MB
- Stars: 5
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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