{"id":17057302,"url":"https://github.com/maximkotliar/parallaxable","last_synced_at":"2025-04-12T17:34:28.695Z","repository":{"id":62450475,"uuid":"136807950","full_name":"MaximKotliar/Parallaxable","owner":"MaximKotliar","description":"Beautiful parallax effect for your Table/Collection cells.","archived":false,"fork":false,"pushed_at":"2020-04-22T00:14:20.000Z","size":447,"stargazers_count":8,"open_issues_count":2,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-20T21:54:56.062Z","etag":null,"topics":["collectionview","collectionviewcell","parallax","swift","tableview","tableviewcell"],"latest_commit_sha":null,"homepage":"","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/MaximKotliar.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":"2018-06-10T12:42:56.000Z","updated_at":"2024-04-19T01:22:31.000Z","dependencies_parsed_at":"2022-11-01T23:31:35.098Z","dependency_job_id":null,"html_url":"https://github.com/MaximKotliar/Parallaxable","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MaximKotliar%2FParallaxable","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MaximKotliar%2FParallaxable/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MaximKotliar%2FParallaxable/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MaximKotliar%2FParallaxable/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MaximKotliar","download_url":"https://codeload.github.com/MaximKotliar/Parallaxable/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248605791,"owners_count":21132234,"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":["collectionview","collectionviewcell","parallax","swift","tableview","tableviewcell"],"created_at":"2024-10-14T10:26:53.046Z","updated_at":"2025-04-12T17:34:28.672Z","avatar_url":"https://github.com/MaximKotliar.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Version](https://img.shields.io/cocoapods/v/Parallaxable.svg?style=flat-square)](http://cocoapods.org/pods/Parallaxable)\n[![License](https://img.shields.io/cocoapods/l/Parallaxable.svg?style=flat-square)](http://cocoapods.org/pods/Parallaxable)\n[![Platform](https://img.shields.io/cocoapods/p/Parallaxable.svg?style=flat-square)](http://cocoapods.org/pods/Parallaxable)\n\n# Parallaxable\n\nBeautiful parallax effect for your Table/Collection cells. (Or something else)\n\n## Installation\nAdd\n\n`pod 'Parallaxable'`\n\nto your podfile, and run\n\n`pod install`\n\n## Usage\nOut of the box, Parallaxable calculates parallax offset for any collection/table cell.\n\nFor enable calculation you need to set:\n\n```swift\ntableView.isParallaxEnabled = true\n```\n\nAlso you need to conform protocol `Parallaxable` with your cell like: \n\n```swift\n\nlet parallaxOffsetMultiplier: CGFloat = 20\n\nextension TableCell: Parallaxable {\n    func updateVerticalParallaxOffset(with offset: CGFloat) {\n        var targetCenter = contentView.center\n        targetCenter.x = imageView.center.x\n        targetCenter.y += offset * parallaxOffsetMultiplier\n        imageView.center = targetCenter\n    }\n\n    func updateHorizontalParallaxOffset(with offset: CGFloat) {\n        var targetCenter = contentView.center\n        targetCenter.x += offset * parallaxOffsetMultiplier\n        targetCenter.y = imageView.center.y\n        imageView.center = targetCenter\n    }\n}\n```\nCode above will offset `TableCell`'s imageView from center by `offset`.\n\n`offset` is value from `-1` to `1` representing position of cell relative to table/collection view's center.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaximkotliar%2Fparallaxable","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaximkotliar%2Fparallaxable","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaximkotliar%2Fparallaxable/lists"}