{"id":18976620,"url":"https://github.com/khuong291/magicpresent","last_synced_at":"2025-07-21T15:07:22.762Z","repository":{"id":62447518,"uuid":"108390326","full_name":"khuong291/MagicPresent","owner":"khuong291","description":"🐉 A lightweight Swift wrapper for custom ViewController presentations on iOS","archived":false,"fork":false,"pushed_at":"2017-11-07T08:57:14.000Z","size":240,"stargazers_count":9,"open_issues_count":0,"forks_count":2,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-07-20T18:08:41.764Z","etag":null,"topics":["animate","custom","present","show","swift"],"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/khuong291.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-10-26T09:27:03.000Z","updated_at":"2024-09-23T16:03:06.000Z","dependencies_parsed_at":"2022-11-01T23:17:32.774Z","dependency_job_id":null,"html_url":"https://github.com/khuong291/MagicPresent","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/khuong291/MagicPresent","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/khuong291%2FMagicPresent","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/khuong291%2FMagicPresent/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/khuong291%2FMagicPresent/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/khuong291%2FMagicPresent/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/khuong291","download_url":"https://codeload.github.com/khuong291/MagicPresent/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/khuong291%2FMagicPresent/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266324497,"owners_count":23911226,"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","status":"online","status_checked_at":"2025-07-21T11:47:31.412Z","response_time":64,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["animate","custom","present","show","swift"],"created_at":"2024-11-08T15:25:36.738Z","updated_at":"2025-07-21T15:07:22.709Z","avatar_url":"https://github.com/khuong291.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cimg src=\"https://image.ibb.co/hpOVFw/Logo.png\" width=\"700\"\u003e\n\n[![Version](https://img.shields.io/cocoapods/v/MagicPresent.svg?style=flat)](http://cocoapods.org/pods/MagicPresent)\n[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)\n[![Swift 3.0](https://img.shields.io/badge/Swift-3.0-orange.svg?style=flat)](https://developer.apple.com/swift/)\n[![Platform](https://img.shields.io/cocoapods/p/MagicPresent.svg?style=flat)](http://cocoapods.org/pods/MagicPresent)\n[![License](https://img.shields.io/cocoapods/l/MagicPresent.svg?style=flat)](http://cocoapods.org/pods/MagicPresent)\n\n*MagicPresent is a simple customizable wrapper for the Custom View Controller Presentation API introduced in iOS 8.*\n\n## About\n\niOS let's you modally present any view controller, but if you want the presented view controller to not cover the whole screen or modify anything about its presentation or transition you have to use the Custom View Controller Presentation API's.\n\nThis can be cumbersome, specially if you do it multiple times in your app. **MagicPresent** simplifies all of this. You just have to configure your **MagicPresent** object depending on how you want you view controller to be presented, and the framework handles everything for you.\n\n\u003cimg src=\"https://github.com/khuong291/MagicPresent/blob/master/BottomPosition.gif\" width=\"192\"\u003e\u003cimg src=\"https://github.com/khuong291/MagicPresent/blob/master/CenterPosition.gif\" width=\"192\"\u003e\u003cimg src=\"https://github.com/khuong291/MagicPresent/blob/master/TopPosition.gif\" width=\"192\"\u003e\n\n## Contributing\n\n1. Fork project\n2. Checkout **master** branch\n3. Create **Feature** branch off of the **master** branch\n4. Create awesome feature/enhancement/bug-fix\n5. Optionally create *Issue* to discuss feature\n6. Submit pull request from your **Feature** branch to MagicPresent's **master** branch\n\n## Installation\n\n### [Cocoapods](http://cocoapods.org)\n\n```ruby\nuse_frameworks!\n\npod 'MagicPresent'\n```\n\n### [Carthage](https://github.com/Carthage/Carthage)\nAdd MagicPresent to you `Cartfile`\n```sh\ngithub \"khuong291/MagicPresent\"\n```\nInstall using\n```sh\ncarthage update --platform ios\n```\n\n### Manually\n1. Download and drop ```/MagicPresent``` folder in your project.  \n2. You're done!\n\n## Getting started\n\n### Create a MagicPresent object\n\nYour **MagicPresent** can be as simple as this:\n\n```swift\nclass ViewController: UIViewController {\n  private var presentationVC: MagicPresent?\n}\n```\n\n### Present the view controller.\n\nInstantiate the View Controller you want to present and use **MagicPresent** object to do the custom presentation.\n\n```swift\nlet vc = ViewController2()\npresentationVC = MagicPresent(presentedViewController: vc, presenting: self)\npresentationVC?.cornerRadius = 6\npresentationVC?.position = .center\npresent(vc, animated: true, completion: nil)\n```\n\nIn your View Controller you want to present, set preferredContentSize with the size you want\n\n```swift\npreferredContentSize = CGSize(width: 350 , height: 350) \n```\n\n## Main Types\n\n### Presentation Position\n\n```swift\npublic enum PresentationPosition {\n  case bottom\n  case center\n  case top\n}\n```\n\n## Properties\n\n#### Properties are optional, as they all have Default values.\n\n```swift\nopen var animationDuration: Double = 0.2\nopen var position: PresentationPosition = .center\nopen var shadowEnabled = true\nopen var cornerRadius: CGFloat = 0\nopen var dismissEnabled = true\nopen var shadowAlpha: CGFloat = 0.5\n    \nopen var shadowOpacity: Float = 0.5\nopen var shadowRadius: CGFloat = 5\nopen var shadowOffsetWidth = 0\nopen var shadowOffsetHeight = -3\n```\n\n## Requirements\n\n* iOS 9.0+\n* Xcode 8.0+\n* Swift 3.0+\n\n##  Author\n[Khuong Pham](http://kasler.net) \u003cbr\u003e\n\n## License\nMagicPresent is released under the MIT license.  \nSee LICENSE for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkhuong291%2Fmagicpresent","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkhuong291%2Fmagicpresent","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkhuong291%2Fmagicpresent/lists"}