{"id":15026857,"url":"https://github.com/ramotion/preview-transition","last_synced_at":"2025-04-15T03:49:37.927Z","repository":{"id":52241747,"uuid":"55409392","full_name":"Ramotion/preview-transition","owner":"Ramotion","description":":octocat: PreviewTransition is a simple preview gallery UI controller with animated tranisitions. Swift UI library made by @Ramotion","archived":false,"fork":false,"pushed_at":"2020-04-06T07:00:09.000Z","size":31870,"stargazers_count":2082,"open_issues_count":4,"forks_count":205,"subscribers_count":63,"default_branch":"master","last_synced_at":"2025-04-15T03:49:21.757Z","etag":null,"topics":["ios","library","swift"],"latest_commit_sha":null,"homepage":"https://www.ramotion.com/preview-transition/","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":"2016-04-04T12:28:00.000Z","updated_at":"2025-03-20T11:08:13.000Z","dependencies_parsed_at":"2022-08-26T05:40:41.471Z","dependency_job_id":null,"html_url":"https://github.com/Ramotion/preview-transition","commit_stats":null,"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ramotion%2Fpreview-transition","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ramotion%2Fpreview-transition/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ramotion%2Fpreview-transition/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ramotion%2Fpreview-transition/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Ramotion","download_url":"https://codeload.github.com/Ramotion/preview-transition/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249003942,"owners_count":21196794,"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-09-24T20:05:15.667Z","updated_at":"2025-04-15T03:49:37.910Z","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=preview-transition\"\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/fpreview-transition\"\u003e\n\u003cimg align=\"left\" src=\"https://github.com/Ramotion/preview-transition/blob/master/preview-transition.gif\" width=\"480\" height=\"360\" /\u003e\u003c/a\u003e\n\n\u003cp\u003e\u003ch1 align=\"left\"\u003ePREVIEW TRANSITION\u003c/h1\u003e\u003c/p\u003e\n\n\u003ch4\u003ePreview Transition is a simple preview gallery UI controller with animated tranisitions\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=preview-transition\"\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[![Travis](https://img.shields.io/travis/Ramotion/preview-transition.svg)](https://travis-ci.org/Ramotion/preview-transition.svg?branch=master)\n[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Ramotion/preview-transition)\n[![CocoaPods](https://img.shields.io/cocoapods/p/PreviewTransition.svg)](https://cocoapods.org/pods/PreviewTransition)\n[![CocoaPods](https://img.shields.io/cocoapods/v/PreviewTransition.svg)](http://cocoapods.org/pods/PreviewTransition)\n[![codebeat badge](https://codebeat.co/badges/b99f71fe-b7e7-4a08-94bd-d98307d176ea)](https://codebeat.co/projects/github-com-ramotion-preview-transition)\n[![Donate](https://img.shields.io/badge/Donate-PayPal-blue.svg)](https://paypal.me/Ramotion)\n\n\n## About\nThis project is maintained by Ramotion, Inc.\u003cbr\u003e\nWe specialize in the designing and coding of custom UI for Mobile Apps and Websites.\u003cbr\u003e\n\n**Looking for developers for your project?**\u003cbr\u003e\nThis project is maintained by Ramotion, Inc. We specialize in the designing and coding of custom UI for Mobile Apps and Websites.\n\n\u003ca href=\"https://www.ramotion.com/agency/app-development/?utm_source=gthb\u0026utm_medium=repo\u0026utm_campaign=preview-transition\"\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 \u003cbr\u003e\n\n## Requirements\n\n- iOS 9.0+\n- Xcode 9\n\n## Licence\n\nPreview-transition is released under the MIT license.\nSee [LICENSE](./LICENSE) for details.\n\n## Installation\n\nJust add the Source folder to your project or use [CocoaPods](https://cocoapods.org) like this:\n``` ruby\npod \"PreviewTransition\"\n```\n\nor [Carthage](https://github.com/Carthage/Carthage) users can simply add to their `Cartfile`:\n```\ngithub \"Ramotion/preview-transition\"\n\n```\n\n## Usage\n\n1) ``` import PreviewTransition ```\n\n2) Create UITableViewController inherit, inheriting from ```PTTableViewController```\n\n3) Add UITableViewDelegate methods\n\n```swift\npublic override func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -\u003e Int {\n    return \u003cRowsCount\u003e\n}\n\npublic override func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -\u003e UITableViewCell {\n    return tableView.dequeueReusableCellWithIdentifier(\u003cCellIdentifier\u003e, forIndexPath: indexPath)\n}\n```\n\n4) add a ParallaxCell\n\nstoryboards:\ncreate a cell and inherit from ```ParallaxCell```; don't forget set the identifier ```\u003cCellIdentifier\u003e```\n\nor programmatically:\nregister a cell in viewDidLoad ```tableView.registerClass(ParallaxCell, forCellReuseIdentifier:\u003cCellIdentifier\u003e)```\n\n5) set cell height\n\n6) create image names (image sizes must be equal to screen size or bigger)\n\n```swift\nlet images = [image_name, image_name, image_name, image_name, image_name] // image names\n```\n\n7) set image and text for ParallaxCell\n\n```swift\npublic override func tableView(tableView: UITableView, willDisplayCell cell: UITableViewCell, forRowAtIndexPath indexPath: NSIndexPath) {\n\n    guard let cell = cell as? ParallaxCell else {\n      return\n    }\n\n    let imageName = images[indexPath.row]\n\n    if let image = UIImage(named: imageName) {\n      cell.setImage(image, title: \u003cSetText\u003e)\n    }\n}\n```\nyour tableViewController should look like [DemoTableViewController](https://github.com/Ramotion/preview-transition/blob/master/PreviewTransitionDemo/PreviewTransitionDemo/ViewController/DemoTableViewController.swift)\n\nMethod ```public override func tableView(tableView: didSelectRowAtIndexPath indexPath:)``` we will add later. (step 10)\n\n8) Create UIViewController, inheriting from ```PTDetailViewController```\n\n9) Add action for backButton and call ```popViewController()```\n\n```swift\nfunc backButtonHandler() {\n    popViewController()\n}\n```\n\n10) Push this UIViewController in UITableViewController. Add method\n\n```swift\npublic override func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath) {\n\n  // create viewController\n  let \u003cYourViewController\u003e = storyboard?.instantiateViewControllerWithIdentifier(\u003cidentifier\u003e)\n  if case let viewController as \u003cYourViewController\u003e = viewController {\n     pushViewController(viewController)\n  }\n}\n```\n\n11) Configure UINavigationBar\n\n```swift\n// transparent background\nUINavigationBar.appearance().setBackgroundImage(UIImage(), forBarMetrics: .Default)\nUINavigationBar.appearance().shadowImage = UIImage()\nUINavigationBar.appearance().translucent = true\nUINavigationBar.appearance().tintColor = .whiteColor()\n\n// set font\nif let font = UIFont(name: \u003cFont name\u003e , size: 18) {\n      UINavigationBar.appearance().titleTextAttributes = [\n        NSForegroundColorAttributeName : UIColor.whiteColor(),\n        NSFontAttributeName : font\n      ]\n}\n```\n\n## 📄 License\n\nPreview Transition 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 https://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=preview-transition\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=preview-transition\"\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\u003cbr\u003e\n\u003cbr\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Framotion%2Fpreview-transition","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Framotion%2Fpreview-transition","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Framotion%2Fpreview-transition/lists"}