{"id":780,"url":"https://github.com/PGSSoft/ParallaxView","last_synced_at":"2025-07-30T19:32:18.573Z","repository":{"id":44795909,"uuid":"68707194","full_name":"PGSSoft/ParallaxView","owner":"PGSSoft","description":"tvOS controls and extensions that add parallax effect to your application.","archived":false,"fork":false,"pushed_at":"2022-01-21T13:11:38.000Z","size":4266,"stargazers_count":483,"open_issues_count":5,"forks_count":51,"subscribers_count":13,"default_branch":"master","last_synced_at":"2024-11-24T02:03:12.695Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://pgssoft.github.io/ParallaxView/","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PGSSoft.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-09-20T11:55:50.000Z","updated_at":"2024-10-11T16:09:31.000Z","dependencies_parsed_at":"2022-08-12T11:40:08.846Z","dependency_job_id":null,"html_url":"https://github.com/PGSSoft/ParallaxView","commit_stats":null,"previous_names":[],"tags_count":30,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PGSSoft%2FParallaxView","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PGSSoft%2FParallaxView/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PGSSoft%2FParallaxView/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PGSSoft%2FParallaxView/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PGSSoft","download_url":"https://codeload.github.com/PGSSoft/ParallaxView/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228178885,"owners_count":17881104,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-01-05T20:15:31.156Z","updated_at":"2024-12-04T19:31:56.956Z","avatar_url":"https://github.com/PGSSoft.png","language":"Swift","readme":"![PGS Software](https://github.com/PGSSoft/ParallaxView/raw/master/Assets/pgssoft-logo.png) \n\n# ParallaxView\n\n[![Swift 5.0](https://img.shields.io/badge/Swift-5.0-orange.svg?style=flat)](https://swift.org/)\n[![CocoaPods Compatible](https://img.shields.io/cocoapods/v/ParallaxView.svg)](https://cocoapods.org/pods/ParallaxView)\n[![Carthage Compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)\n[![SPM Compatible](https://img.shields.io/badge/SPM-supported-DE5C43.svg?style=flat)](https://swift.org/package-manager/)\n[![Platform](https://img.shields.io/cocoapods/p/ParallaxView.svg)](http://cocoadocs.org/docsets/ParallaxView)\n[![License](https://img.shields.io/cocoapods/l/ParallaxView.svg)](https://github.com/PGSSoft/ParallaxView/LICENSE.md)\n\n## Summary\n\n**Easy to use `UIView`, `UICollectionViewCell` with parallax effect and extensions to add this effect to any `UIView`. Rotate view using Apple TV remote. Works confusingly similar to tiles in the home screen of the Apple TV.**\n\n![ParallaxView](https://github.com/PGSSoft/ParallaxView/raw/master/Assets/parallax_view.gif)\n![ParallaxView](https://github.com/PGSSoft/ParallaxView/raw/master/Assets/parallax_collection_view_cell.gif)\n\n### ParallaxView\n\nOpen your storyboard or xib and drag and drop `UIView` control.\nChange custom class to `ParallaxView` in *Identity inspector*.\nYou can also create control from code.\n\n### ParallaxCollectionViewCell\n\nIn *Interface builder* change collection view cell class to `ParallaxCollectionViewCell` or do it from code.\n\nYou can also create subclass of `ParallaxCollectionViewCell` insted of `UICollectionViewCell` and use it as normal collection view cell.\n\n### Extension\n\nIf `ParallaxView` and `ParallaxCollectionViewCell` don't fit to your needs you can use extension that can be used with any `UIView`. In many cases it can look like in this example:\n\n```swift\noverride func didUpdateFocus(in context: UIFocusUpdateContext, with coordinator: UIFocusAnimationCoordinator) {\n\tcoordinator.addCoordinatedAnimations({\n\t\tif context.nextFocusedView === yourCustomView {\n\t\t\tyourCustomView.addParallaxMotionEffects()\n\t\t}\n\t\tif context.previouslyFocusedView === yourCustomView {\n\t\t\tyourCustomView.removeParallaxMotionEffects()\n\t\t}\n\t}, completion: nil)\n}\n```\n\nIt is important to add and remove parallax effect inside the animation block to avoid the glitches.\n`ParallaxView` and `ParallaxCollectionViewCell` internally use the same methods.\nFor more details look into example.\n\n## Customisation\n\nThe component is documented in code, also look into example for more details.\n\n[Documentation](https://pgssoft.github.io/ParallaxView/)\n\n### Properties\n\n`ParallaxView` and `ParallaxCollectionViewCell` have the same properties for customisation.\n\n* `parallaxEffectOptions` - using this property you can customize parallax effect.\n\t* `parallaxMotionEffect` - configure parallax effect (pan, angles, etc.)\n\t* `subviewsParallaxMode` - enum that allow you to configure parallax effect for subviews of the `ParallaxView`\n\t* `shadowPanDeviation` - maximal value of points that shadow of the `ParallaxView` will be moved during parallax effect\n\t* `glowAlpha` - configure alpha of the glow effect (if is equal to 0.0 then the glow effect will be not added)\n\t* `parallaxSubviewsContainer` - custom container view that will be usead to apply subviews parallax effect. By default it will be parallaxable view by itself.\n\t* `glowContainerView` - view that will be used as the container for the glow effect. You don't have to configure this because for `ParallaxView` it will be automatically created a subview for this purpose, while for `ParallaxCollectionViewCell` it will be used `contentView` of the cell. Also by default it is nil when you use extension (`self` will be used as the glow container but only if `glowAlpha` is bigger than 0.0). But if you want to, you can define custom view - look into example project for more details.\n\t* `glowImageView` - image view that will be used as the glow effect. `ParallaxView` framework provides default image that will be set.\n* `glowPosition` - (`.top` default) - allows to customize position of the glow effect related to the `glowImageContainer`. You can provide custom setup by creating `GlowPosition` instance. \n\t\n* `parallaxViewActions` - use properties of this property to change default behaviours of the parallax view. Internally both `ParallaxView` and `ParallaxCollectionViewCell` calls callbacks.\n\t* `setupUnfocusedState ` - closure will be called in animation block when view should change its appearance to the focused state\n\t* `setupFocusedState` - closure will be called in animation block when view should change its appearance to the unfocused state\n\t* `beforeBecomeFocusedAnimation` - closure will be called before the animation to the focused change start\n\t* `beforeResignFocusAnimation` - closure will be called before the animation to the unfocused change start\n\t* `becomeFocused ` - closure will be called when didFocusChange happened. In most cases default implementation should work\n   * `resignFocus ` - closure will be called when didFocusChange happened. In most cases default implementation should work.\n\t* `animatePressIn` - default implementation of the press begin animation\n\t* `animatePressOut` - default implementation of the press ended animation\n* `cornerRadius` - use this value insted of `self.view.layer.cornerRadius`. This will automatically correct radius for glow effect view if it is necessary\n\n## Requirements\n\nSwift 5.0, tvOS 9.0\n\n## Installation\n\n* #### [CocoaPods](https://cocoapods.org/)\n\nAdd line to Podfile \n\n```ruby\n# ...\ntarget 'MyApp' do\n  # your other pod\n  # ...\n  pod 'ParallaxView'\nend\n# ...\n```\n\n* #### [Carthage](https://github.com/Carthage/Carthage)\n\nAdd a line to `Cartfile`:\n\n```\ngithub \"PGSSoft/ParallaxView\"\n```\n\n* #### [Swift Package Manager (SPM)](https://swift.org/package-manager/)\n\n**Xcode 12 (Swift 5.3) required!**\n\nIn Xcode: \n\n***Select File \u003e Swift Packages \u003e Add Package Dependency. Enter https://github.com/PGSSoft/ParallaxView***\n\nIf you would like to check more details please visit the Apple's [documentation](https://developer.apple.com/documentation/xcode/adding_package_dependencies_to_your_app)\n\n* #### Manual\n\nYou can download the latest files from our [Releases page](https://github.com/PGSSoft/ParallaxView/releases). After doing so, drag `ParallaxView.xcodeproj` into your project in Xcode, and for your project target on ***General*** tab in ***Embedded Binaries*** section add `ParallaxView.framework`. Example project is configured the same way, so you have the crib sheet.\n\n## Usage\n\n```swift\nimport ParallaxView\n```\n\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at [https://github.com/PGSSoft/ParallaxView](https://github.com/PGSSoft/ParallaxView).\n\n## License\n\nThe project is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).\n\n## About\n\nThe project maintained by [software development agency](https://www.pgs-soft.com/) [PGS Software](https://www.pgs-soft.com/).\nSee our other [open-source projects](https://github.com/PGSSoft) or [contact us](https://www.pgs-soft.com/contact-us/) to develop your product.\n\n## Follow us\n\n[![Twitter URL](https://img.shields.io/twitter/url/http/shields.io.svg?style=social)](https://twitter.com/intent/tweet?text=https://github.com/PGSSoft/InAppPurchaseButton)  \n[![Twitter Follow](https://img.shields.io/twitter/follow/pgssoftware.svg?style=social\u0026label=Follow)](https://twitter.com/pgssoftware)","funding_links":[],"categories":["Apple TV","HarmonyOS"],"sub_categories":["Other free courses","Getting Started","Windows Manager"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FPGSSoft%2FParallaxView","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FPGSSoft%2FParallaxView","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FPGSSoft%2FParallaxView/lists"}