[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-7023":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":16,"stars7d":16,"stars30d":16,"stars90d":16,"forks30d":16,"starsTrendScore":16,"compositeScore":17,"rankGlobal":10,"rankLanguage":10,"license":18,"archived":19,"fork":19,"defaultBranch":20,"hasWiki":21,"hasPages":19,"topics":22,"createdAt":10,"pushedAt":10,"updatedAt":29,"readmeContent":30,"aiSummary":31,"trendingCount":16,"starSnapshotCount":16,"syncStatus":32,"lastSyncTime":33,"discoverSource":34},7023,"Presentr","IcaliaLabs\u002FPresentr","IcaliaLabs","Swift wrapper for custom ViewController presentations on iOS","",null,"Swift",3049,270,39,28,0,59.3,"MIT License",false,"master",true,[23,24,25,26,27,28],"alert","animation","ios","modal","presentation","transition","2026-06-12 04:00:31","\u003Cimg src=\"http:\u002F\u002Fdanielozano.com\u002FPresentr\u002FScreenshots\u002FPresentrLogo.png\" width=\"700\">\n\n[![Version](https:\u002F\u002Fimg.shields.io\u002Fcocoapods\u002Fv\u002FPresentr.svg?style=flat)](http:\u002F\u002Fcocoapods.org\u002Fpods\u002FPresentr)\n[![Carthage compatible](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FCarthage-compatible-4BC51D.svg?style=flat)](https:\u002F\u002Fgithub.com\u002FCarthage\u002FCarthage)\n[![Swift 3.0](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FSwift-3.0-orange.svg?style=flat)](https:\u002F\u002Fdeveloper.apple.com\u002Fswift\u002F)\n[![Platform](https:\u002F\u002Fimg.shields.io\u002Fcocoapods\u002Fp\u002FPresentr.svg?style=flat)](http:\u002F\u002Fcocoapods.org\u002Fpods\u002FPresentr)\n[![License](https:\u002F\u002Fimg.shields.io\u002Fcocoapods\u002Fl\u002FPresentr.svg?style=flat)](http:\u002F\u002Fcocoapods.org\u002Fpods\u002FPresentr)\n[![codebeat badge](https:\u002F\u002Fcodebeat.co\u002Fbadges\u002Ff89d5cdf-b0c3-441d-b4e1-d56dcea48544)](https:\u002F\u002Fcodebeat.co\u002Fprojects\u002Fgithub-com-icalialabs-presentr)\n![Made with Love by Icalia Labs](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FWith%20love%20by-Icalia%20Labs-ff3434.svg)\n\n*Presentr 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. **Presentr** simplifies all of this. You just have to configure your **Presentr** object depending on how you want you view controller to be presented, and the framework handles everything for you.\n\n\u003Cimg src=\"http:\u002F\u002Fdanielozano.com\u002FPresentr\u002FGifs\u002FAlertSlow.gif\" width=\"192\">\u003Cimg src=\"http:\u002F\u002Fdanielozano.com\u002FPresentr\u002FGifs\u002FPopupSlow.gif\" width=\"192\">\u003Cimg src=\"http:\u002F\u002Fdanielozano.com\u002FPresentr\u002FGifs\u002FTopHalfSlow.gif\" width=\"192\">\u003Cimg src=\"http:\u002F\u002Fdanielozano.com\u002FPresentr\u002FGifs\u002FOtherSlow.gif\" width=\"192\">\n\n*These are just examples of an Alert UI presented in multiple ways. But, with Presentr you can present any custom View Controller you create in any of the Presentation types, or create your own custom one!*\n\n## What's New\n\n#### 1.9 \n- Support for Xcode 10 \u002F iOS 12 \u002F Swift 4.2\n- Last version before big 2.0 update\n\n#### 1.3.1\n- New `FlipHorizontal` transition type (thanks to @falkobuttler)\n- New `CoverFromCorner` transition type (thanks to @freakdragon)\n- New `customOrientation` ModalSize (thanks to @freakdragon)\n- KeyboardTranslation now works for all Presentation Type's (thanks to @oxozle)\n- Other bug fixes & improvements\n\n#### 1.3\n- Swift 4 \u002F Xcode 9 \u002F iOS 11 Support\n- Bug fixes\n\n#### 1.2.0\n- You can add custom BackgroundView. (thanks to @clebta)\n- Add custom text color for AlertViewController\n- New PresentationType called .dynamic that allows dynamic sizing of ViewController using AutoLayout to calculate size.\n- You can set the context so the presentation is done properly on a child view controller and not the whole screen.\n- You can also set the behavior for a tap outside the context.\n- Simpler PresentrAnimation architecture. Simpler to modify existing transition animations or create your own.\n- Two new animations to replace system ones, CoverVertical & CrossDissolve.\n- All animations are now Presentr's, no more Apple animations. This allows greater control & less bugs.\n- Swipe to dismiss feature greatly improved.\n- Bug fixes and other small improvements.\n\n#### 1.1.0\n- You are now able to create your own custom transition animations. See how in readme. (thanks to @fpg1503 & @danlozano)\n- New animation available, coverVerticalWithSpring (thanks to @fpg1503)\n\n#### See CHANGELOG.md for previous\n\n## Contributing\n\n1. Fork project\n2. Checkout **Develop** branch\n3. Create **Feature** branch off of the **Develop** branch\n4. Create awesome feature\u002Fenhancement\u002Fbug-fix\n5. Optionally create *Issue* to discuss feature\n6. Submit pull request from your **Feature** branch to Presentr’s **Develop** branch\n\n## Supported Swift Versions\n\n| Presentr Version   |      Swift Version      |    Min. iOS Version      |\n|----------|:-------------:|:-------------:|\n| \u003C= 0.1.8 |  Swift 2.2  | >= iOS 8.0  |\n| == 0.2.1 |    Swift 2.3 | >= iOS 8.0 |\n| >= 1.0.0 | Swift 3.0 | >= iOS 9.0 |\n| >= 1.3 | Swift 4.0 | >= iOS 9.0 |\n| >= 1.9 | Swift 4.0 & Swift 4.2 | >= iOS 9.0 |\n\n\n## Installation\n\n### [Cocoapods](http:\u002F\u002Fcocoapods.org)\n\n```ruby\nuse_frameworks!\n\npod 'Presentr'\n```\n\n### [Carthage](https:\u002F\u002Fgithub.com\u002FCarthage\u002FCarthage)\nAdd Presentr to you `Cartfile`\n```sh\ngithub \"IcaliaLabs\u002FPresentr\"\n```\nInstall using\n```sh\ncarthage update --platform ios\n```\n\n### Manually\n1. Download and drop ```\u002FPresentr``` folder in your project.  \n2. You're done!\n\n## Getting started\n\n### Create a Presentr object\n\nIt is **important to hold on to the Presentr object as a property** on the presenting\u002Fcurrent View Controller since internally it will be used as a delegate for the custom presentation, so you must hold a strong reference to it.\n\nYour **Presentr** can be as simple as this:\n\n```swift\nclass ViewController: UIViewController {\n\n  let presenter = Presentr(presentationType: .alert)\n\n}\n```\n\nOr as complex as this:\n\n```swift\nclass ViewController: UIViewController {\n\n  let presenter: Presentr = {\n        let width = ModalSize.full\n        let height = ModalSize.fluid(percentage: 0.20)\n        let center = ModalCenterPosition.customOrigin(origin: CGPoint(x: 0, y: 0))\n        let customType = PresentationType.custom(width: width, height: height, center: center)\n\n        let customPresenter = Presentr(presentationType: customType)\n        customPresenter.transitionType = .coverVerticalFromTop\n        customPresenter.dismissTransitionType = .crossDissolve\n        customPresenter.roundCorners = false\n        customPresenter.backgroundColor = .green\n        customPresenter.backgroundOpacity = 0.5\n        customPresenter.dismissOnSwipe = true\n        customPresenter.dismissOnSwipeDirection = .top\n        return customPresenter\n    }()\n\t\n}\n```\n\n### Present the view controller.\n\nInstantiate the View Controller you want to present and use the customPresentViewController method along with your **Presentr** object to do the custom presentation.\n\n```swift\nlet controller = SomeViewController()\ncustomPresentViewController(presenter, viewController: controller, animated: true, completion: nil)\n```\n\nThis is a helper method provided for you as an extension on UIViewController. It handles setting the Presentr object as the delegate for the presentation & transition.\n\nRemember to setup Auto Layout on the ViewController so it can be displayed well on any size.\n\nThe PresentationType (and all other properties) can be changed later on in order to reuse the **Presentr** object for other presentations.\n\n```swift\npresenter.presentationType = .popup\n```\n\n## Main Types\n\n### Presentation Type\n\n```swift\npublic enum PresentationType {\n\n  case alert\n  case popup\n  case topHalf\n  case bottomHalf\n  case fullScreen\n  case dynamic(center: ModalCenterPosition)\n  case custom(width: ModalSize, height: ModalSize, center: ModalCenterPosition)\n  \n}\n```\n#### Alert & Popup\n\n\u003Cimg src=\"http:\u002F\u002Fdanielozano.com\u002FPresentr\u002FGifs\u002FAlertSlow.gif\" width=\"250\">\u003Cimg src=\"http:\u002F\u002Fdanielozano.com\u002FPresentr\u002FGifs\u002FPopupSlow.gif\" width=\"250\">\n\n#### BottomHalf & TopHalf\n\n\u003Cimg src=\"http:\u002F\u002Fdanielozano.com\u002FPresentr\u002FGifs\u002FBottomHalfSlow.gif\" width=\"250\">\u003Cimg src=\"http:\u002F\u002Fdanielozano.com\u002FPresentr\u002FGifs\u002FTopHalfSlow.gif\" width=\"250\">\n\n### Transition Type\n\n```swift\npublic enum TransitionType {\n\n  case coverVertical\n  case crossDissolve\n  case coverVerticalFromTop\n  case coverHorizontalFromRight\n  case coverHorizontalFromLeft\n  case custom(PresentrAnimation)\n  \n}\n```\n\n## Properties\n\n#### Properties are optional, as they all have Default values.\n\nThe only required property for **Presentr** is the **PresentationType**. You initialize the object with one, but it can be changed later on.\n\n```swift\npresenter.presentationType = .popup\n```\n\nYou can choose a TransitionType, which is the animation that will be used to present or dismiss the view controller.\n\n```swift\npresenter.transitionType = .coverVerticalFromTop\npresenter.dismissTransitionType = .crossDissolve\n```\n\nYou can change the background color & opacity for the background view that will be displayed below the presented view controller. You can also set a customBackgroundView that will be displayed on top of the built-in background view.\n\n```swift\npresenter.backgroundColor = UIColor.red\npresenter.backgroundOpacity = 1.0\npresenter.customBackgroundView = UIView()\n```\n\nYou could also turn on the blur effect for the background, and change it's style. If you turn on the blur effect the background color and opacity will be ignored.\n\n```swift\npresenter.blurBackground = true\npresenter.blurStyle = UIBlurEffectStyle.light\n```\n\nYou can choose to disable rounded corners on the view controller that will be presented.\n\n```swift\npresenter.roundCorners = false\n```\n\nIf set to true you can modify the cornerRadius.\n\n```swift\npresenter.cornerRadius = 10\n```\n\nUsing the **PresentrShadow** struct can set a custom shadow on the presented view controller.\n\n```swift\nlet shadow = PresentrShadow()\nshadow.shadowColor = .black\nshadow.shadowOpacity = 0.5\nshadow.shadowOffset = CGSize(5,5)\nshadow.shadowRadius = 4.0\n\npresenter.dropShadow = shadow\n```\n\nYou can choose to disable dismissOnTap that dismisses the presented view controller on tapping the background. Default is true. Or you can disable the animation for the dismissOnTap and dismissOnSwipe.\n\n```swift\npresenter.dismissOnTap = false\npresenter.dismissAnimated = false\n```\n\nYou can activate dismissOnSwipe so that swiping inside the presented view controller dismisses it. Default is false because if your view controller uses any kind of scroll view this is not recommended as it will mess with the scrolling.\n\nYou can also se the direction, for example in case your ViewController is an Alert at the top, you would want to dismiss it by swiping up.\n\n```swift\npresenter.dismissOnSwipe = true\npresenter.dismissOnSwipeDirection = .top\n```\n\nIf you have text fields inside your modal and the presentationType property is set to popup, you can use a **KeyboardTranslationType** to tell **Presentr** how to handle your modal when the keyboard shows up.\n\n```swift\npresenter.keyboardTranslationType = .none\npresenter.keyboardTranslationType = .moveUp\npresenter.keyboardTranslationType = .compress\npresenter.keyboardTranslationType = .stickToTop\n```\n\nIf you are doing a presentation inside a SplitViewController or any other type of container\u002Fchild ViewController situation you can use these properties to handle it properly.\n\nSet the viewControllerForContext to the ViewController you want **Presentr** to use for framing the presentation context. shouldIgnoreTapOutsideContext is set to false by default. This handles what happens when they click outside the context (on the other ViewController).\n\nBe sure to set the viewControllerForContext property before presenting, not on initialization, this makes sure that Auto Layout has finished it's work and the frame for the ViewController is correct.\n\n```swift\n@IBAction func didSelectShowAlert(_ sender: Any) {\n\tpresenter.viewControllerForContext = self\n\tpresenter.shouldIgnoreTapOutsideContext = true\n\tcustomPresentViewController(presenter, viewController: alertController, animated: true, completion: nil)\n}\n```\n\n## Other \u002F Advanced\n\n- [Built in AlertViewController](https:\u002F\u002Fgithub.com\u002FIcaliaLabs\u002FPresentr\u002Fblob\u002Fmaster\u002FALERT.md)\n- [PresentrDelegate](https:\u002F\u002Fgithub.com\u002FIcaliaLabs\u002FPresentr\u002Fblob\u002Fmaster\u002FDELEGATE.md)\n- [PresentationType customization & more](https:\u002F\u002Fgithub.com\u002FIcaliaLabs\u002FPresentr\u002Fblob\u002Fmaster\u002FPRESENTATIONTYPE.md)\n- [TransitionType customization, PresentrAnimation & more](https:\u002F\u002Fgithub.com\u002FIcaliaLabs\u002FPresentr\u002Fblob\u002Fmaster\u002FTRANSITIONTYPE.md)\n\n## Requirements\n\n* iOS 9.0+\n* Xcode 8.0+\n* Swift 3.0+\n\n## Documentation\n\nRead the [docs](http:\u002F\u002Fdanielozano.com\u002FPresentr\u002FDocs\u002F). \n\n##  Author\n[Daniel Lozano](http:\u002F\u002Fdanielozano.com) \u003Cbr>\n\n## Main Contributors\n[Gabriel Peart](http:\u002F\u002Fswiftification.org\u002F)\n\u003Cbr>\u003Cbr>\nLogo design by [Eduardo Higareda](http:\u002F\u002Feldelentes.mx)\u003Cbr>\nAlert design by [Noe Araujo](http:\u002F\u002Fwww.noearaujo.com)\n\n## License\nPresentr is released under the MIT license.  \nSee LICENSE for details.\n","Presentr 是一个用于 iOS 自定义 ViewController 呈现的 Swift 包装器。它简化了使用 Custom View Controller Presentation API 的过程，允许开发者以多种方式（如弹出、半屏显示等）自定义呈现ViewController，并提供了丰富的动画选项来增强用户体验。通过配置 Presentr 对象，可以轻松控制 ViewController 的呈现样式和过渡效果，无需手动处理复杂的API调用。适用于需要在iOS应用中实现非全屏模态视图或自定义动画效果的各种场景，尤其适合追求界面美观且交互流畅的应用开发。",2,"2026-06-11 03:10:10","top_language"]