<commit_before># SYParallaxScrollView

[![Version](https://img.shields.io/cocoapods/v/SYParallaxScrollView.svg?style=flat)](http://cocoapods.org/pods/SYParallaxScrollView)
[![License](https://img.shields.io/cocoapods/l/SYParallaxScrollView.svg?style=flat)](http://cocoapods.org/pods/SYParallaxScrollView)
[![Platform](https://img.shields.io/cocoapods/p/SYParallaxScrollView.svg?style=flat)](http://cocoapods.org/pods/SYParallaxScrollView)

![Demo Animation](https://i.imgur.com/RKG6rwR.gif "Demo")


## Usage

- First, You have to define `SYParallaxViewItem` object.

```swift
let view = UIView(...)
let item = SYParallaxViewItem(view: view,
                      originOffset: CGPoint(x: 150, y: 80),
                      acceleration: SYParallaxAcceleration.invariable(CGPoint(x: 1, y: 1)),
                          progress: { (parallaxView, view) in
                                       //...
                                    }
                              )
```

If you want, You can define a dynamic acceleration.

```swift
let dynamicAcceleration = SYParallaxAcceleration.variable { (parallaxView, view) -> CGPoint in
	let progressRatio = (parallaxView.contentSize.width - 3 * parallaxView.contentOffset.x) / parallaxView.contentSize.width
	return CGPoint(x: 0.65 * progressRatio, y: 0.65 * (1 - progressRatio))
}
<commit_msg>modify image size & animation delay<commit_after># SYParallaxScrollView

[![Version](https://img.shields.io/cocoapods/v/SYParallaxScrollView.svg?style=flat)](http://cocoapods.org/pods/SYParallaxScrollView)
[![License](https://img.shields.io/cocoapods/l/SYParallaxScrollView.svg?style=flat)](http://cocoapods.org/pods/SYParallaxScrollView)
[![Platform](https://img.shields.io/cocoapods/p/SYParallaxScrollView.svg?style=flat)](http://cocoapods.org/pods/SYParallaxScrollView)

![Demo Animation](https://imgur.com/kOxmsHr.gif "Demo")


## Usage

- First, You have to define `SYParallaxViewItem` object.

```swift
let view = UIView(...)
let item = SYParallaxViewItem(view: view,
                      originOffset: CGPoint(x: 150, y: 80),
                      acceleration: SYParallaxAcceleration.invariable(CGPoint(x: 1, y: 1)),
                          progress: { (parallaxView, view) in
                                       //...
                                    }
                              )
```

If you want, You can define a dynamic acceleration.

```swift
let dynamicAcceleration = SYParallaxAcceleration.variable { (parallaxView, view) -> CGPoint in
	let progressRatio = (parallaxView.contentSize.width - 3 * parallaxView.contentOffset.x) / parallaxView.contentSize.width
	return CGPoint(x: 0.65 * progressRatio, y: 0.65 * (1 - progressRatio))
}

{'fraction_non_alphanumeric': 0.1376757957068838, 'fraction_numerical': 0.01147298297557365, 'mean_word_length': 2.9004329004329006, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 8, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '583287', 'n_tokens_mistral': 965, 'n_tokens_neox': 872, 'n_words': 142}