{"id":18538977,"url":"https://github.com/ramotion/elongation-preview","last_synced_at":"2025-04-12T18:51:10.421Z","repository":{"id":43040253,"uuid":"81308009","full_name":"Ramotion/elongation-preview","owner":"Ramotion","description":":octocat: ElongationPreview is an elegant UI push-pop style view controller. iOS library made by @Ramotion","archived":false,"fork":false,"pushed_at":"2020-04-06T07:03:43.000Z","size":26669,"stargazers_count":897,"open_issues_count":4,"forks_count":93,"subscribers_count":38,"default_branch":"master","last_synced_at":"2025-03-04T07:40:20.278Z","etag":null,"topics":["ios","library","swift"],"latest_commit_sha":null,"homepage":"https://www.ramotion.com/ios-mobile-app-development-ui-library-for-interaction-with-cards/","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/Ramotion.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":"2017-02-08T08:50:59.000Z","updated_at":"2025-02-26T10:42:16.000Z","dependencies_parsed_at":"2022-08-03T06:45:19.594Z","dependency_job_id":null,"html_url":"https://github.com/Ramotion/elongation-preview","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ramotion%2Felongation-preview","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ramotion%2Felongation-preview/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ramotion%2Felongation-preview/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ramotion%2Felongation-preview/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Ramotion","download_url":"https://codeload.github.com/Ramotion/elongation-preview/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248618223,"owners_count":21134199,"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":["ios","library","swift"],"created_at":"2024-11-06T19:45:43.559Z","updated_at":"2025-04-12T18:51:10.392Z","avatar_url":"https://github.com/Ramotion.png","language":"Swift","funding_links":["https://paypal.me/Ramotion"],"categories":[],"sub_categories":[],"readme":"\u003ca href=\"https://www.ramotion.com/agency/app-development/?utm_source=gthb\u0026utm_medium=repo\u0026utm_campaign=elongation-preview\"\u003e\u003cimg src=\"https://github.com/Ramotion/folding-cell/blob/master/header.png\"\u003e\u003c/a\u003e\n\n\u003ca href=\"https://github.com/Ramotion/elongation-preview\"\u003e\n\u003cimg align=\"left\" src=\"https://github.com/Ramotion/elongation-preview/blob/master/assets/elongation-preview.gif\" width=\"480\" height=\"360\" /\u003e\u003c/a\u003e\n\n\u003cp\u003e\u003ch1 align=\"left\"\u003eELONGATION PREVIEW\u003c/h1\u003e\u003c/p\u003e\n\n\u003ch4\u003eElongation Preview is an elegant UI push-pop style view controller for iOS.\u003c/h4\u003e\n\n\n___\n\n\n\n\u003cp\u003e\u003ch6\u003eWe specialize in the designing and coding of custom UI for Mobile Apps and Websites.\u003c/h6\u003e\n\u003ca href=\"https://www.ramotion.com/agency/app-development/?utm_source=gthb\u0026utm_medium=repo\u0026utm_campaign=elongation-preview\"\u003e\n\u003cimg src=\"https://github.com/ramotion/gliding-collection/raw/master/contact_our_team@2x.png\" width=\"187\" height=\"34\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\u003cp\u003e\u003ch6\u003eStay tuned for the latest updates:\u003c/h6\u003e\n\u003ca href=\"https://goo.gl/rPFpid\" \u003e\n\u003cimg src=\"https://i.imgur.com/ziSqeSo.png/\" width=\"156\" height=\"28\"\u003e\u003c/a\u003e\u003c/p\u003e\n\n\u003c/br\u003e\n\n[![Twitter](https://img.shields.io/badge/Twitter-@Ramotion-blue.svg?style=flat)](http://twitter.com/Ramotion)\n[![PodPlatform](https://img.shields.io/cocoapods/p/ElongationPreview.svg)](https://cocoapods.org/pods/ElongationPreview)\n[![PodVersion](https://img.shields.io/cocoapods/v/ElongationPreview.svg)](http://cocoapods.org/pods/ElongationPreview)\n[![Documentation](https://img.shields.io/cocoapods/metrics/doc-percent/ElongationPreview.svg)](https://cdn.rawgit.com/Ramotion/elongation-preview/master/docs/index.html)\n[![Donate](https://img.shields.io/badge/Donate-PayPal-blue.svg)](https://paypal.me/Ramotion)\n[![Carthage](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Ramotion/elongation-preview)\n[![Codebeat](https://codebeat.co/badges/6a009992-5bf2-4730-aa35-f3b20ce7693d)](https://codebeat.co/projects/github-com-ramotion-elongation-preview)\n\n\u003cbr\u003e\n\n\n## Requirements\n\n- iOS 9.0+\n- Xcode 8\n- Swift 3 (\u003c= 1.0.5)\n- Swift 4 (\u003e= 1.1)\n\n\u003cbr\u003e\n\n## Installation\nYou can install `ElongationPreview` in several ways:\n\n- Add source files to your project.\n\n\u003cbr\u003e\n\n- Use [CocoaPods](https://cocoapods.org):\n``` ruby\npod 'ElongationPreview'\n```\n\n\u003cbr\u003e\n\n- Use [Carthage](https://github.com/Carthage/Carthage):\n```\ngithub \"Ramotion/elongation-preview\"\n```\n\n\u003cbr\u003e\n\n## How to use\n\nFirst of all, import module to your source file.\n\n```swift\nimport ElongationPreview\n```\n\n### `ElongationViewController`\n\nThen subclass `ElongationViewController` and configure it as you wish.\n\n```swift\nclass RootViewController: ElongationViewController { }\n```\n\nNow you must register reusable cell in `tableView`. If you prefer to use Storyboards, you can drag `UITableViewCell` from bottom-right menu, *lay it out* and change it's class to `ElongationCell`. Of course, there are some specific requirements on how you can configure cell's subviews.\n\n#### `ElongationCell`\n\n- Easier way: copy [DemoElongationCell](/ElongationPreviewDemo/Views/DemoElongationCell/DemoElongationCell.xib) from demo project and change it as you wish. Add your own views to `top`, `bottom` and `scalable` containers.\n\n- If you want to create cell from scratch, this is how your cell hierarchy should look like:\n\n   ![hierarchy](/assets/elongationCellHierarchy.png)\n   \n  ##### Required properties:   \n  `bottomView` — the view which comes from behind the cell when you tap on the cell.\n\n  `scalableView` — the view which will be scaled when you tap on the cell.\n \n  `topView` — static top view, add here all the views which won't be scaled and must stay on their position.\n\n  Also you must connect this constraints: `topViewHeightConstraint`, `topViewTopConstraint`, `bottomViewHeightConstraint`, `bottomViewTopConstraint`.\n\n\u003cbr\u003e\n\n\u003e📌 If you need to override\n\u003e```swift\n\u003efunc scrollViewDidScroll(_ scrollView: UIScrollView)\n\u003e```\n\u003eor\n\u003e```swift\n\u003efunc tableView(_ tableView: UITableView, willDisplay cell: UITableViewCell, forRowAt indexPath: IndexPath)\n\u003e```\n\u003eyou must call `super` because some important configuration was made in these methods in superclass (`ElongationViewController`).\n\n\u003cbr\u003e\n\n### `ElongationDetailViewController`\n\n```swift\nclass DetailViewController: ElongationDetailViewController { }\n```\n\nIf you want to display some details for objects from the `root` view, it's better to subclass `ElongationDetailViewController` and configure it for displaying your data.\n\nThis class holds `headerView` property which actually represents `ElongationCell` in expanded state and it'll be used as a header for `tableView` by default.\n\n\u003e📌 Override `openDetailView(for: IndexPath)` method, create your `ElongationDetailViewController` instance and call `expand(viewController: ElongationDetailViewController, animated: Bool)` method with this instance.\n\u003e\n\u003eThis is the place where you need to configure your `ElongationDetailViewController` subclass.\n\n\u003cbr\u003e\n\n## Appearance \u0026 Behaviour\nYou can customize both appearance \u0026 behaviour of `ElongationPreview` control by tuning some params of `ElongationConfig` and overriding `shared` instance.\n\n```swift\n// Create new config.\nvar config = ElongationConfig()\n\n// Change desired properties.\nconfig.scaleViewScaleFactor = 0.9\nconfig.topViewHeight = 190\nconfig.bottomViewHeight = 170\nconfig.bottomViewOffset = 20\nconfig.parallaxFactor = 100\nconfig.separatorHeight = 0.5\nconfig.separatorColor = .white\n\n// Save created config as `shared` instance.\nElongationConfig.shared = config\n```\n\n\u003e🗒 All parameters with their descriptions listed in [`ElongationConfig`](/ElongationPreview/Source/ElongationConfig.swift) file.\n\n\n## 📄 License\n\nElongation Preview is released under the MIT license.\nSee [LICENSE](./LICENSE) for details.\n\nThis library is a part of a \u003ca href=\"https://github.com/Ramotion/swift-ui-animation-components-and-libraries\"\u003e\u003cb\u003eselection of our best UI open-source projects.\u003c/b\u003e\u003c/a\u003e\n\nIf you use the open-source library in your project, please make sure to credit and backlink to www.ramotion.com\n\n## 📱 Get the Showroom App for iOS to give it a try\nTry this UI component and more like this in our iOS app. Contact us if interested.\n\n\u003ca href=\"https://itunes.apple.com/app/apple-store/id1182360240?pt=550053\u0026ct=elongation-preview\u0026mt=8\" \u003e\n\u003cimg src=\"https://github.com/ramotion/gliding-collection/raw/master/app_store@2x.png\" width=\"117\" height=\"34\"\u003e\u003c/a\u003e\n\n\u003ca href=\"https://www.ramotion.com/agency/app-development/?utm_source=gthb\u0026utm_medium=repo\u0026utm_campaign=elongation-preview\"\u003e\n\u003cimg src=\"https://github.com/ramotion/gliding-collection/raw/master/contact_our_team@2x.png\" width=\"187\" height=\"34\"\u003e\u003c/a\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Framotion%2Felongation-preview","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Framotion%2Felongation-preview","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Framotion%2Felongation-preview/lists"}