├── .github └── PULL_REQUEST_TEMPLATE.md ├── .gitignore ├── .swift-version ├── .swiftlint.yml ├── ALERT.md ├── CHANGELOG.md ├── DELEGATE.md ├── LICENSE ├── PRESENTATIONTYPE.md ├── Presentr.podspec ├── Presentr.xcodeproj ├── .gitignore ├── project.pbxproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist └── xcshareddata │ └── xcschemes │ └── Presentr.xcscheme ├── Presentr ├── AlertViewController.swift ├── AlertViewController.xib ├── BackgroundView.swift ├── CoverFromCornerAnimation.swift ├── CoverHorizontalAnimation.swift ├── CoverVerticalAnimation.swift ├── CoverVerticalFromTopAnimation.swift ├── CrossDissolveAnimation.swift ├── FlipHorizontalAnimation.swift ├── Info.plist ├── KeyboardTranslation.swift ├── ModalCenterPosition.swift ├── ModalSize.swift ├── Montserrat-Regular.ttf ├── PresentationType.swift ├── Presentr+Equatable.swift ├── Presentr.h ├── Presentr.swift ├── PresentrAnimation.swift ├── PresentrController.swift ├── PresentrShadow.swift ├── SourceSansPro-Regular.ttf └── TransitionType.swift ├── PresentrExample ├── Podfile ├── PresentrExample.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ └── contents.xcworkspacedata ├── PresentrExample.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist └── PresentrExample │ ├── AppDelegate.swift │ ├── Assets.xcassets │ ├── AppIcon.appiconset │ │ └── Contents.json │ ├── Contents.json │ └── Logo.imageset │ │ ├── Contents.json │ │ └── presentr.png │ ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard │ ├── CustomAnimation.swift │ ├── DynamicViewController.swift │ ├── ExampleTableViewCell.swift │ ├── FirstViewController.swift │ ├── Info.plist │ ├── MainTableViewController.swift │ ├── PasstroughExampleViewController.swift │ ├── PopupViewController.swift │ ├── SecondViewController.swift │ └── SplitViewController.swift ├── PresentrTests ├── Info.plist └── PresentrTests.swift ├── README.md ├── TRANSITIONTYPE.md └── docs ├── Classes.html ├── Classes ├── AlertAction.html ├── AlertViewController.html └── Presentr.html ├── Enums.html ├── Enums ├── AlertActionStyle.html ├── ModalCenterPosition.html ├── ModalSize.html ├── PresentationType.html ├── PresentrType.html └── TransitionType.html ├── Extensions.html ├── Extensions └── UIViewController.html ├── Functions.html ├── Protocols.html ├── Protocols └── AlertViewControllerDelegate.html ├── Typealiases.html ├── css ├── highlight.css └── jazzy.css ├── docsets ├── Presentr.docset │ └── Contents │ │ ├── Info.plist │ │ └── Resources │ │ ├── Documents │ │ ├── Classes.html │ │ ├── Classes │ │ │ ├── AlertAction.html │ │ │ ├── AlertViewController.html │ │ │ └── Presentr.html │ │ ├── Enums.html │ │ ├── Enums │ │ │ ├── AlertActionStyle.html │ │ │ ├── ModalCenterPosition.html │ │ │ ├── ModalSize.html │ │ │ ├── PresentationType.html │ │ │ ├── PresentrType.html │ │ │ └── TransitionType.html │ │ ├── Extensions.html │ │ ├── Extensions │ │ │ └── UIViewController.html │ │ ├── Functions.html │ │ ├── Protocols.html │ │ ├── Protocols │ │ │ └── AlertViewControllerDelegate.html │ │ ├── Typealiases.html │ │ ├── css │ │ │ ├── highlight.css │ │ │ └── jazzy.css │ │ ├── img │ │ │ ├── carat.png │ │ │ ├── dash.png │ │ │ └── gh.png │ │ ├── index.html │ │ ├── js │ │ │ ├── jazzy.js │ │ │ └── jquery.min.js │ │ └── undocumented.json │ │ └── docSet.dsidx └── Presentr.tgz ├── img ├── carat.png ├── dash.png └── gh.png ├── index.html ├── js ├── jazzy.js └── jquery.min.js └── undocumented.json /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | ### What does this PR do? 2 | 3 | * 4 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ## OS X Finder 2 | .DS_Store 3 | 4 | ## Build generated 5 | build/ 6 | DerivedData 7 | 8 | ## Various settings 9 | *.pbxuser 10 | !default.pbxuser 11 | *.mode1v3 12 | !default.mode1v3 13 | *.mode2v3 14 | !default.mode2v3 15 | *.perspectivev3 16 | !default.perspectivev3 17 | xcuserdata 18 | 19 | ## Other 20 | *.xccheckout 21 | *.moved-aside 22 | *.xcuserstate 23 | *.xcscmblueprint 24 | 25 | ## Obj-C/Swift specific 26 | *.hmap 27 | *.ipa 28 | 29 | # Swift Package Manager 30 | .build/ 31 | 32 | ## Cocoapods 33 | Pods/ 34 | Podfile.lock 35 | 36 | # Carthage 37 | Carthage/Build 38 | -------------------------------------------------------------------------------- /.swift-version: -------------------------------------------------------------------------------- 1 | 4.2 2 | -------------------------------------------------------------------------------- /.swiftlint.yml: -------------------------------------------------------------------------------- 1 | disabled_rules: 2 | - line_length 3 | - missing_docs 4 | - function_parameter_count 5 | - cyclomatic_complexity 6 | opt_in_rules: 7 | - empty_count 8 | - missing_docs 9 | included: 10 | excluded: 11 | - docs 12 | - PresentrExample 13 | - PresentrTests 14 | force_cast: warning 15 | force_try: 16 | severity: warning 17 | line_length: 150 18 | type_body_length: 19 | - 300 # warning 20 | - 400 # error 21 | file_length: 22 | warning: 500 23 | error: 1200 24 | type_name: 25 | min_length: 4 # only warning 26 | max_length: # warning and error 27 | warning: 40 28 | error: 50 29 | excluded: iPhone # excluded via string 30 | variable_name: 31 | min_length: 32 | error: 1 # only error 33 | excluded: # excluded via string array 34 | - id 35 | - URL 36 | - GlobalAPIKey 37 | reporter: "json" # reporter type (xcode, json, csv, checkstyle) -------------------------------------------------------------------------------- /ALERT.md: -------------------------------------------------------------------------------- 1 | ## AlertViewController 2 | 3 | Presentr also comes with a cool AlertViewController baked in if you want something different from Apple's. The API is very similar to Apple's alert controller. 4 | 5 | ```swift 6 | 7 | let alertViewController = AlertViewController(title: title, body: body) 8 | 9 | let deleteAction = AlertAction(title: "Sure 🕶", style: .destructive) { (action) in 10 | print("Deleted!") 11 | } 12 | 13 | let okAction = AlertAction(title: "Ok", style: .custom(textColor: .green)) { (action) in 14 | print("Ok!") 15 | } 16 | 17 | controller.addAction(deleteAction) 18 | controller.addAction(okAction) 19 | 20 | presenter.presentationType = .alert 21 | customPresentViewController(presenter, viewController: controller, animated: true, completion: nil) 22 | 23 | ``` 24 | 25 | 26 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ### What's New 2 | 3 | #### 1.2.0 4 | - You can add custom BackgroundView. (thanks to @clebta) 5 | - Add custom text color for AlertViewController 6 | - New PresentationType called .dynamic that allows dynamic sizing of ViewController using AutoLayout to calculate size. 7 | - You can set the context so the presentation is done properly on a child view controller and not the whole screen. 8 | - You can also set the behavior for a tap outside the context. 9 | - Simpler PresentrAnimation architecture. Simpler to modify existing transition animations or create your own. 10 | - Two new animations to replace system ones, CoverVertical & CrossDissolve. 11 | - All animations are now Presentr's, no more Apple animations. This allows greater control & less bugs. 12 | - Swipe to dismiss feature greatly improved. 13 | - Bug fixes and other small improvements. 14 | 15 | #### 1.1.0 16 | - You are now able to create your own custom transition animations. See how in readme. (thanks to @fpg1503 & @danlozano) 17 | - New animation available, coverVerticalWithSpring (thanks to @fpg1503) 18 | 19 | #### 1.0.5 20 | - Support for animated blurred background (thanks to @fpg1503) 21 | 22 | #### 1.0.4 23 | - New ModalSize option with sideMargin value (thanks to @alediaz84) 24 | - Example project fixes 25 | 26 | #### 1.0.3 27 | - Support for custom radius & drop shadow (thanks @falkobuttler) 28 | - New fluid percentage option for ModalSize enum (thanks @mseijas) 29 | - Example project and other general improvements (thanks @gabrielPeart) 30 | 31 | #### 1.0.2 32 | - Bug Fixes 33 | 34 | #### 1.0.1 35 | - Added keyboard observation options for .popup (thanks @aasatt) 36 | - Swipe to dismiss gesture (thanks @josejuanqm) 37 | 38 | #### 1.0.0 39 | - Adds support for Swift 3.0, XCode 8 & iOS 10. 40 | - This will be the only maintained version from here on out. 41 | 42 | #### 0.2.0 43 | - Adds support for Swift 2.3. 44 | - This version will not be updated/mantained. If you need the latest features, you must use Swift 3.0. 45 | 46 | #### 0.1.8 47 | - .FullScreen PresentationType. 48 | - Ability to set animation on/off for dismissOnTap. 49 | 50 | #### 0.1.7 51 | - Ability to set dismiss transition type. 52 | - Modify background color & opacity. 53 | - Add blur to background. 54 | 55 | #### 0.1.6 56 | - Custom PresentationType's. 57 | - Round corners option. 58 | -------------------------------------------------------------------------------- /DELEGATE.md: -------------------------------------------------------------------------------- 1 | ## Delegate 2 | 3 | You can conform to the PresentrDelegate protocol in your presented view controller if you want to get a callback. Using this method you can prevent the view controller from being dismissed when the background is tapped and/or perform something before it's dismissed. 4 | 5 | ```swift 6 | func presentrShouldDismiss(keyboardShowing: Bool) -> Bool { } 7 | ``` 8 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2016 Daniel Lozano Valdes 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /PRESENTATIONTYPE.md: -------------------------------------------------------------------------------- 1 | ## Dynamic PresentationType 2 | 3 | This new PresentationType uses Auto Layout to calculate the sizing for the ViewController. 4 | 5 | Make sure that your constraints are not ambigous. You have to set ALL constraints in both X and Y coordinates in order for it to work properly. If you have a UILabel that you want to allow to expand set the lines to 0. 6 | 7 | ## Creating a custom PresentationType 8 | 9 | If you need to present a controller in a way that is not handled by the included presentation types you can create your own. 10 | 11 | You create a custom **PresentationType** using the **.custom** case on the **PresentationType** enum. 12 | 13 | ```swift 14 | let customType = PresentationType.custom(width: width, height: height, center: center) 15 | ``` 16 | 17 | It has three associated values for the width, height and center position of the presented controller. For setting them we use two other enums. 18 | 19 | ```Swift 20 | // This is used to calculate either a width or height value. 21 | public enum ModalSize { 22 | 23 | case default 24 | case half 25 | case full 26 | case custom(size: Float) 27 | case fluid(percentage: Float) 28 | 29 | } 30 | 31 | // This is used to calculate the center point position for the modal. 32 | public enum ModalCenterPosition { 33 | 34 | case center 35 | case topCenter 36 | case bottomCenter 37 | case custom(centerPoint: CGPoint) // Custom fixed center point. 38 | case customOrigin(origin: CGPoint) // Custom fixed origin point. 39 | 40 | } 41 | ``` 42 | 43 | This allows us to use a fixed value when we want 44 | 45 | ```swift 46 | let width = ModalSize.custom(size: 300) // Custom 300pt width 47 | ``` 48 | 49 | But also let Presentr handle the calculations when we want something more common. 50 | 51 | ```swift 52 | let height = ModalSize.full // Whole screen height 53 | ``` 54 | 55 | We could also set a fixed position 56 | 57 | ```swift 58 | let position = ModalCenterPosition.custom(centerPoint: CGPoint(x: 150, y: 150)) // Custom center point 59 | ``` 60 | 61 | Or let presentr calculate the position 62 | 63 | ```swift 64 | let position = ModalCenterPosition.center // Center of the screen 65 | ``` 66 | 67 | So we can mix and match, and have the benefit of a custom **PresentationType** but still have *Presentr* calculating the values we don't want to do ourselves. The following code creates a *Presentr* object with a custom **PresentationType** which shows the alert in a small top banner. 68 | 69 | ```swift 70 | class ViewController: UIViewController{ 71 | 72 | let customPresenter: Presentr = { 73 | 74 | let width = ModalSize.full 75 | let height = ModalSize.custom(size: 150) 76 | let center = ModalCenterPosition.customOrigin(origin: CGPoint(x: 0, y: 0)) 77 | 78 | let customType = PresentationType.custom(width: width, height: height, center: center) 79 | 80 | let customPresenter = Presentr(presentationType: customType) 81 | customPresenter.transitionType = .coverVerticalFromTop 82 | customPresenter.roundCorners = false 83 | return customPresenter 84 | 85 | }() 86 | 87 | } 88 | ``` 89 | 90 | 91 | -------------------------------------------------------------------------------- /Presentr.podspec: -------------------------------------------------------------------------------- 1 | Pod::Spec.new do |s| 2 | s.name = "Presentr" 3 | s.version = "1.9" 4 | s.summary = "A simple Swift wrapper for custom view controller presentations." 5 | s.description = <<-DESC 6 | Simplifies creating custom view controller presentations. Specially the typical ones we use which are a popup, an alert, or a any non-full-screen modal. Abstracts having to deal with custom presentation controllers and transitioning delegates 7 | DESC 8 | s.homepage = "http://github.com/icalialabs/Presentr" 9 | s.license = { :type => "MIT", :file => "LICENSE" } 10 | s.author = { "Daniel Lozano" => "dan@danielozano.com" } 11 | s.social_media_url = "http://twitter.com/danlozanov" 12 | s.platform = :ios, "9.0" 13 | s.swift_version = "4.2" 14 | s.source = { :git => "https://github.com/icalialabs/Presentr.git", :tag => s.version.to_s } 15 | s.source_files = "Presentr/**/*.{swift}" 16 | s.resources = "Presentr/**/*.{xib,ttf}" 17 | end 18 | -------------------------------------------------------------------------------- /Presentr.xcodeproj/.gitignore: -------------------------------------------------------------------------------- 1 | ## OS X Finder 2 | .DS_Store 3 | 4 | ## Build generated 5 | build/ 6 | DerivedData 7 | 8 | ## Various settings 9 | *.pbxuser 10 | !default.pbxuser 11 | *.mode1v3 12 | !default.mode1v3 13 | *.mode2v3 14 | !default.mode2v3 15 | *.perspectivev3 16 | !default.perspectivev3 17 | xcuserdata 18 | 19 | ## Other 20 | *.xccheckout 21 | *.moved-aside 22 | *.xcuserstate 23 | *.xcscmblueprint 24 | 25 | ## Obj-C/Swift specific 26 | *.hmap 27 | *.ipa 28 | 29 | # Swift Package Manager 30 | .build/ 31 | 32 | # Carthage 33 | Carthage/Build 34 | -------------------------------------------------------------------------------- /Presentr.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Presentr.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Presentr.xcodeproj/xcshareddata/xcschemes/Presentr.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 33 | 39 | 40 | 41 | 42 | 43 | 49 | 50 | 51 | 52 | 53 | 54 | 64 | 65 | 71 | 72 | 73 | 74 | 75 | 76 | 82 | 83 | 89 | 90 | 91 | 92 | 94 | 95 | 98 | 99 | 100 | -------------------------------------------------------------------------------- /Presentr/AlertViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AlertViewController.swift 3 | // OneUP 4 | // 5 | // Created by Daniel Lozano on 5/10/16. 6 | // Copyright © 2016 Icalia Labs. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | public typealias AlertActionHandler = (() -> Void) 12 | 13 | /// Describes each action that is going to be shown in the 'AlertViewController' 14 | public class AlertAction { 15 | 16 | public let title: String 17 | public let style: AlertActionStyle 18 | public let handler: AlertActionHandler? 19 | 20 | /** 21 | Initialized an 'AlertAction' 22 | 23 | - parameter title: The title for the action, that will be used as the title for a button in the alert controller 24 | - parameter style: The style for the action, that will be used to style a button in the alert controller. 25 | - parameter handler: The handler for the action, that will be called when the user clicks on a button in the alert controller. 26 | 27 | - returns: An inmutable AlertAction object 28 | */ 29 | public init(title: String, style: AlertActionStyle, handler: AlertActionHandler?) { 30 | self.title = title 31 | self.style = style 32 | self.handler = handler 33 | } 34 | 35 | } 36 | 37 | /** 38 | Describes the style for an action, that will be used to style a button in the alert controller. 39 | 40 | - Default: Green text label. Meant to draw attention to the action. 41 | - Cancel: Gray text label. Meant to be neutral. 42 | - Destructive: Red text label. Meant to warn the user about the action. 43 | */ 44 | public enum AlertActionStyle { 45 | 46 | case `default` 47 | case cancel 48 | case destructive 49 | case custom(textColor: UIColor) 50 | 51 | /** 52 | Decides which color to use for each style 53 | 54 | - returns: UIColor representing the color for the current style 55 | */ 56 | func color() -> UIColor { 57 | switch self { 58 | case .default: 59 | return ColorPalette.greenColor 60 | case .cancel: 61 | return ColorPalette.grayColor 62 | case .destructive: 63 | return ColorPalette.redColor 64 | case let .custom(color): 65 | return color 66 | } 67 | } 68 | 69 | } 70 | 71 | private enum Font: String { 72 | 73 | case Montserrat = "Montserrat-Regular" 74 | case SourceSansPro = "SourceSansPro-Regular" 75 | 76 | func font(_ size: CGFloat = 15.0) -> UIFont { 77 | return UIFont(name: self.rawValue, size: size)! 78 | } 79 | 80 | } 81 | 82 | private struct ColorPalette { 83 | 84 | static let grayColor = UIColor(red: 151.0/255.0, green: 151.0/255.0, blue: 151.0/255.0, alpha: 1) 85 | static let greenColor = UIColor(red: 58.0/255.0, green: 213.0/255.0, blue: 91.0/255.0, alpha: 1) 86 | static let redColor = UIColor(red: 255.0/255.0, green: 103.0/255.0, blue: 100.0/255.0, alpha: 1) 87 | 88 | } 89 | 90 | protocol CornerRadiusSettable { 91 | 92 | func customContainerViewSetCornerRadius(_ radius: CGFloat) 93 | 94 | } 95 | 96 | /// UIViewController subclass that displays the alert 97 | public class AlertViewController: UIViewController, CornerRadiusSettable { 98 | 99 | /// Text that will be used as the title for the alert 100 | public var titleText: String = "" { 101 | didSet { 102 | titleLabel?.text = titleText 103 | } 104 | } 105 | 106 | /// Text that will be used as the body for the alert 107 | public var bodyText: String = "" { 108 | didSet { 109 | bodyLabel?.text = bodyText 110 | } 111 | } 112 | 113 | /// If set to false, alert wont auto-dismiss the controller when an action is clicked. Dismissal will be up to the action's handler. Default is true. 114 | public var autoDismiss: Bool = true 115 | 116 | /// If autoDismiss is set to true, then set this property if you want the dismissal to be animated. Default is true. 117 | public var dismissAnimated: Bool = true 118 | 119 | public let titleFont: UIFont? 120 | 121 | public let bodyFont: UIFont? 122 | 123 | public let buttonFont: UIFont? 124 | 125 | fileprivate var actions = [AlertAction]() 126 | 127 | @IBOutlet private weak var titleLabel: UILabel! 128 | @IBOutlet private weak var bodyLabel: UILabel! 129 | @IBOutlet private weak var firstButton: UIButton! 130 | @IBOutlet private weak var secondButton: UIButton! 131 | @IBOutlet private weak var containerView: UIView! 132 | 133 | public init(title: String? = nil, body: String? = nil, titleFont: UIFont? = nil, bodyFont: UIFont? = nil, buttonFont: UIFont? = nil) { 134 | if let title = title { 135 | titleText = title 136 | } 137 | 138 | if let body = body { 139 | bodyText = body 140 | } 141 | 142 | self.titleFont = titleFont 143 | self.bodyFont = bodyFont 144 | self.buttonFont = buttonFont 145 | 146 | super.init(nibName: "AlertViewController", bundle: Bundle(for: type(of: self))) 147 | } 148 | 149 | required public init?(coder aDecoder: NSCoder) { 150 | fatalError("Unsupported initializer, please use init()") 151 | } 152 | 153 | override public func viewDidLoad() { 154 | super.viewDidLoad() 155 | 156 | if actions.isEmpty { 157 | let okAction = AlertAction(title: "ok 🕶", style: .default, handler: nil) 158 | addAction(okAction) 159 | } 160 | 161 | setupContainerView() 162 | setupFonts() 163 | setupLabels() 164 | setupButtons() 165 | } 166 | 167 | override public func didReceiveMemoryWarning() { 168 | super.didReceiveMemoryWarning() 169 | } 170 | 171 | // MARK: AlertAction's 172 | 173 | /** 174 | Adds an 'AlertAction' to the alert controller. There can be maximum 2 actions. Any more will be ignored. The order is important. 175 | 176 | - parameter action: The 'AlertAction' to be added 177 | */ 178 | public func addAction(_ action: AlertAction) { 179 | guard actions.count < 2 else { return } 180 | actions += [action] 181 | } 182 | 183 | // MARK: Setup, CornerRadiusSettable 184 | 185 | func customContainerViewSetCornerRadius(_ radius: CGFloat) { 186 | containerView.layer.cornerRadius = radius 187 | } 188 | 189 | private func setupContainerView() { 190 | containerView.clipsToBounds = true 191 | } 192 | 193 | private func setupFonts() { 194 | if titleFont == nil || bodyFont == nil || buttonFont == nil { 195 | loadFonts 196 | } 197 | 198 | titleLabel.font = titleFont ?? Font.Montserrat.font() 199 | bodyLabel.font = bodyFont ?? Font.SourceSansPro.font() 200 | firstButton.titleLabel?.font = buttonFont ?? Font.Montserrat.font(11.0) 201 | secondButton.titleLabel?.font = buttonFont ?? Font.Montserrat.font(11.0) 202 | } 203 | 204 | private func setupLabels() { 205 | titleLabel.text = titleText 206 | bodyLabel.text = bodyText 207 | } 208 | 209 | private func setupButtons() { 210 | guard let firstAction = actions.first else { return } 211 | apply(firstAction, toButton: firstButton) 212 | if actions.count == 2 { 213 | let secondAction = actions.last! 214 | apply(secondAction, toButton: secondButton) 215 | } else { 216 | secondButton.removeFromSuperview() 217 | } 218 | } 219 | 220 | private func apply(_ action: AlertAction, toButton: UIButton) { 221 | let title = action.title.uppercased() 222 | let style = action.style 223 | toButton.setTitle(title, for: UIControl.State()) 224 | toButton.setTitleColor(style.color(), for: UIControl.State()) 225 | } 226 | 227 | // MARK: IBAction's 228 | 229 | @IBAction func didSelectFirstAction(_ sender: AnyObject) { 230 | guard let firstAction = actions.first else { return } 231 | firstAction.handler?() 232 | dismiss() 233 | } 234 | 235 | @IBAction func didSelectSecondAction(_ sender: AnyObject) { 236 | guard let secondAction = actions.last, actions.count == 2 else { return } 237 | secondAction.handler?() 238 | dismiss() 239 | } 240 | 241 | // MARK: Helper's 242 | 243 | func dismiss() { 244 | guard autoDismiss else { return } 245 | self.dismiss(animated: dismissAnimated, completion: nil) 246 | } 247 | 248 | } 249 | 250 | // MARK: - Font Loading 251 | 252 | let loadFonts: () = { 253 | let loadedFontMontserrat = AlertViewController.loadFont(Font.Montserrat.rawValue) 254 | let loadedFontSourceSansPro = AlertViewController.loadFont(Font.SourceSansPro.rawValue) 255 | if loadedFontMontserrat && loadedFontSourceSansPro { 256 | print("LOADED FONTS") 257 | } 258 | }() 259 | 260 | extension AlertViewController { 261 | 262 | static func loadFont(_ name: String) -> Bool { 263 | let bundle = Bundle(for: self) 264 | guard let fontPath = bundle.path(forResource: name, ofType: "ttf"), 265 | let data = try? Data(contentsOf: URL(fileURLWithPath: fontPath)), 266 | let provider = CGDataProvider(data: data as CFData), 267 | let font = CGFont(provider) 268 | else { 269 | return false 270 | } 271 | 272 | var error: Unmanaged? 273 | 274 | let success = CTFontManagerRegisterGraphicsFont(font, &error) 275 | if !success { 276 | print("Error loading font. Font is possibly already registered.") 277 | return false 278 | } 279 | 280 | return true 281 | } 282 | 283 | } 284 | -------------------------------------------------------------------------------- /Presentr/BackgroundView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // BackgroundView.swift 3 | // Pods 4 | // 5 | // Created by Daniel Lozano Valdés on 3/20/17. 6 | // 7 | // 8 | 9 | import UIKit 10 | 11 | class PassthroughView: UIView { 12 | 13 | var shouldPassthrough = true 14 | 15 | var passthroughViews: [UIView] = [] 16 | 17 | override func hitTest(_ point: CGPoint, with event: UIEvent?) -> UIView? { 18 | var view = super.hitTest(point, with: event) 19 | 20 | if view == self && shouldPassthrough { 21 | for passthroughView in passthroughViews { 22 | view = passthroughView.hitTest(convert(point, to: passthroughView), with: event) 23 | if view != nil { 24 | break 25 | } 26 | } 27 | } 28 | 29 | return view 30 | } 31 | 32 | } 33 | -------------------------------------------------------------------------------- /Presentr/CoverFromCornerAnimation.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CoverRightBottomAnimation.swift 3 | // LanopticCabinet 4 | // 5 | // Created by Admin on 16.02.18. 6 | // Copyright © 2018 LAN-Optic, LLC. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | import UIKit 11 | 12 | public enum Corner { 13 | 14 | case topLeft 15 | case topRight 16 | case bottomLeft 17 | case bottomRight 18 | 19 | var top: Bool { 20 | switch self { 21 | case .topLeft, .topRight: 22 | return true 23 | default: 24 | return false 25 | } 26 | } 27 | 28 | var left: Bool { 29 | switch self { 30 | case .topLeft, .bottomLeft: 31 | return true 32 | case .topRight, .bottomRight: 33 | return false 34 | } 35 | } 36 | 37 | } 38 | 39 | public class CoverFromCornerAnimation: PresentrAnimation { 40 | 41 | let corner: Corner 42 | 43 | public init(corner: Corner) { 44 | self.corner = corner 45 | } 46 | 47 | override public func transform(containerFrame: CGRect, finalFrame: CGRect) -> CGRect { 48 | var initialFrame = finalFrame 49 | 50 | if corner.top { 51 | initialFrame.origin.y = 0 - initialFrame.size.height 52 | } else { 53 | initialFrame.origin.y = containerFrame.size.height + initialFrame.size.height 54 | } 55 | 56 | if corner.left { 57 | initialFrame.origin.x = 0 - initialFrame.size.width 58 | } else { 59 | initialFrame.origin.x = containerFrame.size.width + initialFrame.size.width 60 | } 61 | 62 | return initialFrame 63 | } 64 | 65 | } 66 | -------------------------------------------------------------------------------- /Presentr/CoverHorizontalAnimation.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CoverHorizontalAnimation.swift 3 | // Presentr 4 | // 5 | // Created by Daniel Lozano on 5/15/16. 6 | // Copyright © 2016 danielozano. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | public class CoverHorizontalAnimation: PresentrAnimation { 12 | 13 | private var fromRight: Bool 14 | 15 | public init(fromRight: Bool = true) { 16 | self.fromRight = fromRight 17 | } 18 | 19 | override public func transform(containerFrame: CGRect, finalFrame: CGRect) -> CGRect { 20 | var initialFrame = finalFrame 21 | if fromRight { 22 | initialFrame.origin.x = containerFrame.size.width + initialFrame.size.width 23 | } else { 24 | initialFrame.origin.x = 0 - initialFrame.size.width 25 | } 26 | return initialFrame 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /Presentr/CoverVerticalAnimation.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CoverVerticalAnimation.swift 3 | // Pods 4 | // 5 | // Created by Daniel Lozano Valdés on 3/21/17. 6 | // 7 | // 8 | 9 | import Foundation 10 | 11 | public class CoverVerticalAnimation: PresentrAnimation { 12 | 13 | override public func transform(containerFrame: CGRect, finalFrame: CGRect) -> CGRect { 14 | var initialFrame = finalFrame 15 | initialFrame.origin.y = containerFrame.height + initialFrame.height 16 | return initialFrame 17 | } 18 | 19 | } 20 | -------------------------------------------------------------------------------- /Presentr/CoverVerticalFromTopAnimation.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CoverVerticalFromTopAnimation.swift 3 | // Presentr 4 | // 5 | // Created by Daniel Lozano on 5/14/16. 6 | // Copyright © 2016 danielozano. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | public class CoverVerticalFromTopAnimation: PresentrAnimation { 12 | 13 | override public func transform(containerFrame: CGRect, finalFrame: CGRect) -> CGRect { 14 | var initialFrame = finalFrame 15 | initialFrame.origin.y = 0 - initialFrame.size.height 16 | return initialFrame 17 | } 18 | 19 | } 20 | -------------------------------------------------------------------------------- /Presentr/CrossDissolveAnimation.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CrossDissolveAnimation.swift 3 | // Pods 4 | // 5 | // Created by Daniel Lozano Valdés on 3/21/17. 6 | // 7 | // 8 | 9 | import Foundation 10 | 11 | public class CrossDissolveAnimation: PresentrAnimation { 12 | 13 | override public func beforeAnimation(using transitionContext: PresentrTransitionContext) { 14 | transitionContext.animatingView?.alpha = transitionContext.isPresenting ? 0.0 : 1.0 15 | } 16 | 17 | override public func performAnimation(using transitionContext: PresentrTransitionContext) { 18 | transitionContext.animatingView?.alpha = transitionContext.isPresenting ? 1.0 : 0.0 19 | } 20 | 21 | override public func afterAnimation(using transitionContext: PresentrTransitionContext) { 22 | transitionContext.animatingView?.alpha = 1.0 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /Presentr/FlipHorizontalAnimation.swift: -------------------------------------------------------------------------------- 1 | // 2 | // FlipHorizontalAnimation.swift 3 | // Presentr 4 | // 5 | // Created by Falko Buttler on 10/2/17. 6 | // 7 | // Inspired by https://stackoverflow.com/questions/12565204/smooth-horizontal-flip-using-catransform3dmakerotation 8 | 9 | import Foundation 10 | 11 | public class FlipHorizontalAnimation: PresentrAnimation { 12 | 13 | override public func performAnimation(using transitionContext: PresentrTransitionContext) { 14 | // This is to make sure transform/animation does not go behind background "chrome" view. 15 | transitionContext.toView?.layer.zPosition = 999 16 | transitionContext.fromView?.layer.zPosition = 999 17 | 18 | var fromViewRotationPerspectiveTrans = CATransform3DIdentity 19 | fromViewRotationPerspectiveTrans.m34 = -0.003 20 | fromViewRotationPerspectiveTrans = CATransform3DRotate(fromViewRotationPerspectiveTrans, .pi / 2.0, 0.0, -1.0, 0.0) 21 | 22 | var toViewRotationPerspectiveTrans = CATransform3DIdentity 23 | toViewRotationPerspectiveTrans.m34 = -0.003 24 | toViewRotationPerspectiveTrans = CATransform3DRotate(toViewRotationPerspectiveTrans, .pi / 2.0, 0.0, 1.0, 0.0) 25 | 26 | transitionContext.toView?.layer.transform = toViewRotationPerspectiveTrans 27 | 28 | UIView.animate(withDuration: 0.6, delay: 0, options: .curveLinear, animations: { 29 | transitionContext.fromView?.layer.transform = fromViewRotationPerspectiveTrans 30 | }) { _ in 31 | UIView.animate(withDuration: 0.6, delay: 0, options: .curveLinear, animations: { 32 | transitionContext.toView?.layer.transform = CATransform3DMakeRotation(.pi / 2.0, 0.0, 0.0, 0.0) 33 | }) { _ in } 34 | } 35 | } 36 | 37 | } 38 | 39 | -------------------------------------------------------------------------------- /Presentr/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | $(CURRENT_PROJECT_VERSION) 23 | NSPrincipalClass 24 | 25 | UIAppFonts 26 | 27 | Montserrat-Regular.ttf 28 | SourceSansPro-Regular.ttf 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /Presentr/KeyboardTranslation.swift: -------------------------------------------------------------------------------- 1 | // 2 | // KeyboardTranslation.swift 3 | // Presentr 4 | // 5 | // Created by Aaron Satterfield on 7/15/16. 6 | // Copyright © 2016 danielozano. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | import UIKit 11 | 12 | public enum KeyboardTranslationType { 13 | 14 | case none 15 | case moveUp 16 | case compress 17 | case stickToTop 18 | 19 | /** 20 | Calculates the correct frame for the keyboard translation type. 21 | 22 | - parameter keyboardFrame: The UIKeyboardFrameEndUserInfoKey CGRect Value of the Keyboard 23 | - parameter presentedFrame: The frame of the presented controller that may need to be translated. 24 | - returns: CGRect representing the new frame of the presented view. 25 | */ 26 | public func getTranslationFrame(keyboardFrame: CGRect, presentedFrame: CGRect) -> CGRect { 27 | let keyboardTop = UIScreen.main.bounds.height - keyboardFrame.size.height 28 | let buffer: CGFloat = (presentedFrame.origin.y + presentedFrame.size.height == UIScreen.main.bounds.height) ? 0 : 20.0 // add a 20 pt buffer except when the presentedFrame is stick to bottom 29 | let presentedViewBottom = presentedFrame.origin.y + presentedFrame.height + buffer 30 | let offset = presentedViewBottom - keyboardTop 31 | switch self { 32 | case .moveUp: 33 | if offset > 0.0 { 34 | let frame = CGRect(x: presentedFrame.origin.x, y: presentedFrame.origin.y-offset, width: presentedFrame.size.width, height: presentedFrame.size.height) 35 | return frame 36 | } 37 | return presentedFrame 38 | case .compress: 39 | if offset > 0.0 { 40 | let y = max(presentedFrame.origin.y-offset, 20.0) 41 | let newHeight = y != 20.0 ? presentedFrame.size.height : keyboardTop - 40.0 42 | let frame = CGRect(x: presentedFrame.origin.x, y: y, width: presentedFrame.size.width, height: newHeight) 43 | return frame 44 | } 45 | return presentedFrame 46 | case .stickToTop: 47 | if offset > 0.0 { 48 | let y = max(presentedFrame.origin.y-offset, 20.0) 49 | let frame = CGRect(x: presentedFrame.origin.x, y: y, width: presentedFrame.size.width, height: presentedFrame.size.height) 50 | return frame 51 | } 52 | return presentedFrame 53 | case .none: 54 | return presentedFrame 55 | } 56 | } 57 | } 58 | 59 | // MARK: Notification + UIKeyboardInfo 60 | 61 | extension Notification { 62 | 63 | /// Gets the optional CGRect value of the UIKeyboardFrameEndUserInfoKey from a UIKeyboard notification 64 | func keyboardEndFrame () -> CGRect? { 65 | #if swift(>=4.2) 66 | let frameKey = UIResponder.keyboardFrameEndUserInfoKey 67 | #else 68 | let frameKey = UIKeyboardFrameEndUserInfoKey 69 | #endif 70 | 71 | return (self.userInfo?[frameKey] as? NSValue)?.cgRectValue 72 | } 73 | 74 | /// Gets the optional AnimationDuration value of the UIKeyboardAnimationDurationUserInfoKey from a UIKeyboard notification 75 | func keyboardAnimationDuration () -> Double? { 76 | #if swift(>=4.2) 77 | let durationKey = UIResponder.keyboardAnimationDurationUserInfoKey 78 | #else 79 | let durationKey = UIKeyboardAnimationDurationUserInfoKey 80 | #endif 81 | 82 | return (self.userInfo?[durationKey] as? NSNumber)?.doubleValue 83 | } 84 | } 85 | -------------------------------------------------------------------------------- /Presentr/ModalCenterPosition.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ModalCenterPosition.swift 3 | // Presentr 4 | // 5 | // Created by Daniel Lozano on 7/6/16. 6 | // Copyright © 2016 danielozano. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | /** 12 | Describes the presented presented view controller's center position. It is meant to be non-specific, but we can use the 'calculatePoint' method when we want to calculate the exact point by passing in the 'containerBounds' rect that only the presentation controller should be aware of. 13 | 14 | - Center: Center of the screen. 15 | - TopCenter: Center of the top half of the screen. 16 | - BottomCenter: Center of the bottom half of the screen. 17 | - Custom: A custom center position using a CGPoint which represents the center point of the presented view controller. 18 | - Custom: A custom center position to be calculated, using a CGPoint which represents the origin of the presented view controller. 19 | */ 20 | public enum ModalCenterPosition { 21 | 22 | case center 23 | case topCenter 24 | case bottomCenter 25 | case custom(centerPoint: CGPoint) 26 | case customOrigin(origin: CGPoint) 27 | 28 | /** 29 | Calculates the exact position for the presented view controller center. 30 | 31 | - parameter containerBounds: The container bounds the controller is being presented in. 32 | 33 | - returns: CGPoint representing the presented view controller's center point. 34 | */ 35 | func calculateCenterPoint(_ containerFrame: CGRect) -> CGPoint? { 36 | switch self { 37 | case .center: 38 | return CGPoint(x: containerFrame.origin.x + (containerFrame.width / 2), 39 | y: containerFrame.origin.y + (containerFrame.height / 2)) 40 | case .topCenter: 41 | return CGPoint(x: containerFrame.origin.x + (containerFrame.width / 2), 42 | y: containerFrame.origin.y + (containerFrame.height * (1 / 4) - 1)) 43 | case .bottomCenter: 44 | return CGPoint(x: containerFrame.origin.x + (containerFrame.width / 2), 45 | y: containerFrame.origin.y + (containerFrame.height * (3 / 4))) 46 | case .custom(let point): 47 | return point 48 | case .customOrigin(_): 49 | return nil 50 | } 51 | } 52 | 53 | func calculateOrigin() -> CGPoint? { 54 | switch self { 55 | case .customOrigin(let origin): 56 | return origin 57 | default: 58 | return nil 59 | } 60 | } 61 | 62 | } 63 | -------------------------------------------------------------------------------- /Presentr/ModalSize.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ModalSize.swift 3 | // Presentr 4 | // 5 | // Created by Daniel Lozano on 7/6/16. 6 | // Copyright © 2016 danielozano. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | import UIKit 11 | 12 | /** 13 | Descibes a presented modal's size dimension (width or height). It is meant to be non-specific, but the exact position can be calculated by calling the 'calculate' methods, passing in the 'parentSize' which only the Presentation Controller should be aware of. 14 | 15 | - Default: Default size. Will use Presentr's default margins to calculate size of presented controller. This is the size the .Popup presentation type uses. 16 | - Half: Half of the screen. 17 | - Full: Full screen. 18 | - Custom: Custom fixed size. 19 | - Fluid: Custom percentage-based fluid size. 20 | - SideMargin: Uses side margins to calculate size. 21 | */ 22 | public enum ModalSize { 23 | 24 | case `default` 25 | case half 26 | case full 27 | case fluid(percentage: Float) 28 | case sideMargin(value: Float) 29 | case custom(size: Float) 30 | case customOrientation(sizePortrait: Float, sizeLandscape: Float) 31 | 32 | /** 33 | Calculates the exact width value for the presented view controller. 34 | 35 | - parameter parentSize: The presenting view controller's size. Provided by the presentation controller. 36 | 37 | - returns: Exact float width value. 38 | */ 39 | func calculateWidth(_ parentSize: CGSize) -> Float { 40 | switch self { 41 | case .default: 42 | return floorf(Float(parentSize.width) - (PresentrConstants.Values.defaultSideMargin * 2.0)) 43 | case .half: 44 | return floorf(Float(parentSize.width) / 2.0) 45 | case .full: 46 | return Float(parentSize.width) 47 | case .custom(let size): 48 | return size 49 | case .customOrientation(let sizePortrait, let sizeLandscape): 50 | switch UIDevice.current.orientation { 51 | case .portrait, .portraitUpsideDown: 52 | return min(Float(UIScreen.main.bounds.width), sizePortrait) 53 | case .landscapeLeft, .landscapeRight: 54 | return min(Float(UIScreen.main.bounds.width), sizeLandscape) 55 | default: 56 | return min(Float(UIScreen.main.bounds.width), sizePortrait) 57 | } 58 | case .fluid(let percentage): 59 | return floorf(Float(parentSize.width) * percentage) 60 | case .sideMargin(let value): 61 | return floorf(Float(parentSize.width) - value * 2.0) 62 | } 63 | } 64 | 65 | /** 66 | Calculates the exact height value for the presented view controller. 67 | 68 | - parameter parentSize: The presenting view controller's size. Provided by the presentation controller. 69 | 70 | - returns: Exact float height value. 71 | */ 72 | func calculateHeight(_ parentSize: CGSize) -> Float { 73 | switch self { 74 | case .default: 75 | return floorf(Float(parentSize.height) * PresentrConstants.Values.defaultHeightPercentage) 76 | case .half: 77 | return floorf(Float(parentSize.height) / 2.0) 78 | case .full: 79 | return Float(parentSize.height) 80 | case .custom(let size): 81 | return size 82 | case .customOrientation(let sizePortrait, let sizeLandscape): 83 | switch UIDevice.current.orientation { 84 | case .portrait, .portraitUpsideDown: 85 | return min(Float(UIScreen.main.bounds.height), sizePortrait) 86 | case .landscapeLeft, .landscapeRight: 87 | return min(Float(UIScreen.main.bounds.height), sizeLandscape) 88 | default: 89 | return min(Float(UIScreen.main.bounds.height), sizePortrait) 90 | } 91 | case .fluid(let percentage): 92 | return floorf(Float(parentSize.height) * percentage) 93 | case .sideMargin(let value): 94 | return floorf(Float(parentSize.height) - value * 2) 95 | } 96 | } 97 | 98 | } 99 | -------------------------------------------------------------------------------- /Presentr/Montserrat-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IcaliaLabs/Presentr/bc06d3bb7e734fb8600d8a05f99a44e3af17199d/Presentr/Montserrat-Regular.ttf -------------------------------------------------------------------------------- /Presentr/PresentationType.swift: -------------------------------------------------------------------------------- 1 | // 2 | // PresentationType.swift 3 | // Presentr 4 | // 5 | // Created by Daniel Lozano on 7/6/16. 6 | // Copyright © 2016 danielozano. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | /// Basic Presentr type. Its job is to describe the 'type' of presentation. The type describes the size and position of the presented view controller. 12 | /// 13 | /// - alert: This is a small 270 x 180 alert which is the same size as the default iOS alert. 14 | /// - popup: This is a average/default size 'popup' modal. 15 | /// - topHalf: This takes up half of the screen, on the top side. 16 | /// - bottomHalf: This takes up half of the screen, on the bottom side. 17 | /// - fullScreen: This takes up the entire screen. 18 | /// - dynamic: Uses autolayout to calculate width & height. Have to provide center position. 19 | /// - custom: User provided custom width, height & center position. 20 | public enum PresentationType { 21 | 22 | case alert 23 | case popup 24 | case topHalf 25 | case bottomHalf 26 | case fullScreen 27 | case dynamic(center: ModalCenterPosition) 28 | case custom(width: ModalSize, height: ModalSize, center: ModalCenterPosition) 29 | 30 | /// Describes the sizing for each Presentr type. It is meant to be non device/width specific, except for the .custom case. 31 | /// 32 | /// - Returns: A tuple containing two 'ModalSize' enums, describing its width and height. 33 | func size() -> (width: ModalSize, height: ModalSize)? { 34 | switch self { 35 | case .alert: 36 | return (.custom(size: 270), .custom(size: 180)) 37 | case .popup: 38 | return (.default, .default) 39 | case .topHalf, .bottomHalf: 40 | return (.full, .half) 41 | case .fullScreen: 42 | return (.full, .full) 43 | case .custom(let width, let height, _): 44 | return (width, height) 45 | case .dynamic(_): 46 | return nil 47 | } 48 | } 49 | 50 | /// Describes the position for each Presentr type. It is meant to be non device/width specific, except for the .custom case. 51 | /// 52 | /// - Returns: Returns a 'ModalCenterPosition' enum describing the center point for the presented modal. 53 | func position() -> ModalCenterPosition { 54 | switch self { 55 | case .alert, .popup: 56 | return .center 57 | case .topHalf: 58 | return .topCenter 59 | case .bottomHalf: 60 | return .bottomCenter 61 | case .fullScreen: 62 | return .center 63 | case .custom(_, _, let center): 64 | return center 65 | case .dynamic(let center): 66 | return center 67 | } 68 | } 69 | 70 | /// Associates each Presentr type with a default transition type, in case one is not provided to the Presentr object. 71 | /// 72 | /// - Returns: Return a 'TransitionType' which describes a transition animation. 73 | func defaultTransitionType() -> TransitionType { 74 | switch self { 75 | case .topHalf: 76 | return .coverVerticalFromTop 77 | default: 78 | return .coverVertical 79 | } 80 | } 81 | 82 | /// Default round corners setting. 83 | var shouldRoundCorners: Bool { 84 | switch self { 85 | case .alert, .popup: 86 | return true 87 | default: 88 | return false 89 | } 90 | } 91 | 92 | } 93 | -------------------------------------------------------------------------------- /Presentr/Presentr+Equatable.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Presentr+Equatable.swift 3 | // Presentr 4 | // 5 | // Created by Daniel Lozano on 7/6/16. 6 | // Copyright © 2016 danielozano. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | extension PresentationType: Equatable { } 12 | public func == (lhs: PresentationType, rhs: PresentationType) -> Bool { 13 | switch (lhs, rhs) { 14 | case (let .custom(lhsWidth, lhsHeight, lhsCenter), let .custom(rhsWidth, rhsHeight, rhsCenter)): 15 | return lhsWidth == rhsWidth && lhsHeight == rhsHeight && lhsCenter == rhsCenter 16 | case (.alert, .alert): 17 | return true 18 | case (.popup, .popup): 19 | return true 20 | case (.topHalf, .topHalf): 21 | return true 22 | case (.bottomHalf, .bottomHalf): 23 | return true 24 | case (.dynamic, .dynamic): 25 | return true 26 | default: 27 | return false 28 | } 29 | } 30 | 31 | extension ModalSize: Equatable { } 32 | public func == (lhs: ModalSize, rhs: ModalSize) -> Bool { 33 | switch (lhs, rhs) { 34 | case (let .custom(lhsSize), let .custom(rhsSize)): 35 | return lhsSize == rhsSize 36 | case (.default, .default): 37 | return true 38 | case (.half, .half): 39 | return true 40 | case (.full, .full): 41 | return true 42 | default: 43 | return false 44 | } 45 | } 46 | 47 | extension ModalCenterPosition: Equatable { } 48 | public func == (lhs: ModalCenterPosition, rhs: ModalCenterPosition) -> Bool { 49 | switch (lhs, rhs) { 50 | case (let .custom(lhsCenterPoint), let .custom(rhsCenterPoint)): 51 | return lhsCenterPoint.x == rhsCenterPoint.x && lhsCenterPoint.y == rhsCenterPoint.y 52 | case (.center, .center): 53 | return true 54 | case (.topCenter, .topCenter): 55 | return true 56 | case (.bottomCenter, .bottomCenter): 57 | return true 58 | default: 59 | return false 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /Presentr/Presentr.h: -------------------------------------------------------------------------------- 1 | // 2 | // Presentr.h 3 | // Presentr 4 | // 5 | // Created by Daniel Lozano on 5/11/16. 6 | // Copyright © 2016 danielozano. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | //! Project version number for Presentr. 12 | FOUNDATION_EXPORT double PresentrVersionNumber; 13 | 14 | //! Project version string for Presentr. 15 | FOUNDATION_EXPORT const unsigned char PresentrVersionString[]; 16 | 17 | // In this header, you should import all the public headers of your framework using statements like #import 18 | 19 | 20 | -------------------------------------------------------------------------------- /Presentr/PresentrAnimation.swift: -------------------------------------------------------------------------------- 1 | // 2 | // PresentrAnimation.swift 3 | // Presentr 4 | // 5 | // Created by Daniel Lozano on 5/14/16. 6 | // Copyright © 2016 danielozano. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | /// Simplified wrapper for the UIViewControllerContextTransitioning protocol. 12 | public struct PresentrTransitionContext { 13 | 14 | public let containerView: UIView 15 | 16 | public let initialFrame: CGRect 17 | 18 | public let finalFrame: CGRect 19 | 20 | public let isPresenting: Bool 21 | 22 | public let fromViewController: UIViewController? 23 | 24 | public let toViewController: UIViewController? 25 | 26 | public let fromView: UIView? 27 | 28 | public let toView: UIView? 29 | 30 | public let animatingViewController: UIViewController? 31 | 32 | public let animatingView: UIView? 33 | 34 | } 35 | 36 | /// Options for the UIView animation. 37 | public enum AnimationOptions { 38 | 39 | case normal(duration: TimeInterval) 40 | 41 | case spring(duration: TimeInterval, delay: TimeInterval, damping: CGFloat, velocity: CGFloat) 42 | 43 | } 44 | 45 | /// Class that handles animating the transition. Override this class if you want to create your own transition animation. 46 | open class PresentrAnimation: NSObject { 47 | 48 | public var options: AnimationOptions 49 | 50 | public init(options: AnimationOptions = .normal(duration: 0.4)) { 51 | self.options = options 52 | } 53 | 54 | /// For simple transitions, override this method to calculate an initial frame for the animation. For more complex animations override beforeAnimation & performAnimation. Only override this method OR beforeAnimation & performAnimation. This method won't even be called if you override beforeAnimation. 55 | /// 56 | /// - Parameters: 57 | /// - containerFrame: The container frame for the animation. 58 | /// - finalFrame: The final frame for the animation. 59 | /// - Returns: The initial frame. 60 | open func transform(containerFrame: CGRect, finalFrame: CGRect) -> CGRect { 61 | var initialFrame = finalFrame 62 | initialFrame.origin.y = containerFrame.height + initialFrame.height 63 | return initialFrame 64 | } 65 | 66 | 67 | /// Actions to be performed in preparation, before an animation. 68 | /// 69 | /// - Parameter transitionContext: The context with everything needed for the animiation. 70 | open func beforeAnimation(using transitionContext: PresentrTransitionContext) { 71 | let finalFrameForVC = transitionContext.finalFrame 72 | let initialFrameForVC = transform(containerFrame: transitionContext.containerView.frame, finalFrame: finalFrameForVC) 73 | 74 | let initialFrame = transitionContext.isPresenting ? initialFrameForVC : finalFrameForVC 75 | transitionContext.animatingView?.frame = initialFrame 76 | } 77 | 78 | 79 | /// Actions to be performed for the animation. 80 | /// 81 | /// - Parameter transitionContext: The context with everything needed for the animiation. 82 | open func performAnimation(using transitionContext: PresentrTransitionContext) { 83 | let finalFrameForVC = transitionContext.finalFrame 84 | let initialFrameForVC = transform(containerFrame: transitionContext.containerView.frame, finalFrame: finalFrameForVC) 85 | 86 | let finalFrame = transitionContext.isPresenting ? finalFrameForVC : initialFrameForVC 87 | transitionContext.animatingView?.frame = finalFrame 88 | } 89 | 90 | /// Actions to be performed after the animation. 91 | /// 92 | /// - Parameter transitionContext: The context with everything needed for the animiation. 93 | open func afterAnimation(using transitionContext: PresentrTransitionContext) { 94 | // Any cleanup to be done after the animation is over. 95 | } 96 | 97 | } 98 | 99 | // MARK: - UIViewControllerAnimatedTransitioning 100 | 101 | extension PresentrAnimation: UIViewControllerAnimatedTransitioning { 102 | 103 | public func transitionDuration(using transitionContext: UIViewControllerContextTransitioning?) -> TimeInterval { 104 | switch options { 105 | case let .normal(duration): 106 | return duration 107 | case let .spring(duration, _, _, _): 108 | return duration 109 | } 110 | } 111 | 112 | public func animateTransition(using transitionContext: UIViewControllerContextTransitioning) { 113 | let containerView = transitionContext.containerView 114 | 115 | let fromViewController = transitionContext.viewController(forKey: UITransitionContextViewControllerKey.from) 116 | let toViewController = transitionContext.viewController(forKey: UITransitionContextViewControllerKey.to) 117 | let fromView = transitionContext.view(forKey: UITransitionContextViewKey.from) 118 | let toView = transitionContext.view(forKey: UITransitionContextViewKey.to) 119 | 120 | let isPresenting: Bool = (toViewController?.presentingViewController == fromViewController) 121 | 122 | let animatingVC = isPresenting ? toViewController : fromViewController 123 | let animatingView = isPresenting ? toView : fromView 124 | 125 | let initialFrame = transitionContext.initialFrame(for: animatingVC!) 126 | let finalFrame = transitionContext.finalFrame(for: animatingVC!) 127 | 128 | let presentrContext = PresentrTransitionContext(containerView: containerView, 129 | initialFrame: initialFrame, 130 | finalFrame: finalFrame, 131 | isPresenting: isPresenting, 132 | fromViewController: fromViewController, 133 | toViewController: toViewController, 134 | fromView: fromView, 135 | toView: toView, 136 | animatingViewController: animatingVC, 137 | animatingView: animatingView) 138 | if isPresenting { 139 | containerView.addSubview(toView!) 140 | } 141 | 142 | switch options { 143 | case let .normal(duration): 144 | animate(presentrContext: presentrContext, 145 | transitionContext: transitionContext, 146 | duration: duration) 147 | case let .spring(duration, delay, damping, velocity): 148 | animateWithSpring(presentrContext: presentrContext, 149 | transitionContext: transitionContext, 150 | duration: duration, 151 | delay: delay, 152 | damping: damping, 153 | velocity: velocity) 154 | } 155 | 156 | } 157 | 158 | private func animate(presentrContext: PresentrTransitionContext, transitionContext: UIViewControllerContextTransitioning, duration: TimeInterval) { 159 | beforeAnimation(using: presentrContext) 160 | UIView.animate(withDuration: duration, animations: { 161 | self.performAnimation(using: presentrContext) 162 | }) { (completed) in 163 | self.afterAnimation(using: presentrContext) 164 | transitionContext.completeTransition(!transitionContext.transitionWasCancelled) 165 | } 166 | } 167 | 168 | private func animateWithSpring(presentrContext: PresentrTransitionContext, transitionContext: UIViewControllerContextTransitioning, duration: TimeInterval, delay: TimeInterval, damping: CGFloat, velocity: CGFloat) { 169 | beforeAnimation(using: presentrContext) 170 | UIView.animate(withDuration: duration, 171 | delay: delay, 172 | usingSpringWithDamping: damping, 173 | initialSpringVelocity: velocity, 174 | options: [], 175 | animations: { 176 | self.performAnimation(using: presentrContext) 177 | }) { (completed) in 178 | self.afterAnimation(using: presentrContext) 179 | transitionContext.completeTransition(!transitionContext.transitionWasCancelled) 180 | } 181 | } 182 | 183 | } 184 | -------------------------------------------------------------------------------- /Presentr/PresentrShadow.swift: -------------------------------------------------------------------------------- 1 | // 2 | // PresentrShadow.swift 3 | // Pods 4 | // 5 | // Created by Daniel Lozano Valdés on 3/21/17. 6 | // 7 | // 8 | 9 | import UIKit 10 | 11 | /// Helper struct that represents the shadow properties 12 | public struct PresentrShadow { 13 | 14 | public let shadowColor: UIColor? 15 | 16 | public let shadowOpacity: Float? 17 | 18 | public let shadowOffset: CGSize? 19 | 20 | public let shadowRadius: CGFloat? 21 | 22 | public init(shadowColor: UIColor?, shadowOpacity: Float?, shadowOffset: CGSize?, shadowRadius: CGFloat?) { 23 | self.shadowColor = shadowColor 24 | self.shadowOpacity = shadowOpacity 25 | self.shadowOffset = shadowOffset 26 | self.shadowRadius = shadowRadius 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /Presentr/SourceSansPro-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IcaliaLabs/Presentr/bc06d3bb7e734fb8600d8a05f99a44e3af17199d/Presentr/SourceSansPro-Regular.ttf -------------------------------------------------------------------------------- /Presentr/TransitionType.swift: -------------------------------------------------------------------------------- 1 | // 2 | // TransitionType.swift 3 | // Presentr 4 | // 5 | // Created by Daniel Lozano on 7/6/16. 6 | // Copyright © 2016 danielozano. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | /// Describes the transition animation for presenting the view controller. 12 | /// 13 | /// - crossDissolve: Crossfade animation transition. 14 | /// - coverVertical: Slides in vertically from bottom. 15 | /// - coverVerticalFromTop: Slides in vertically from top. 16 | /// - coverHorizontalFromRight: Slides in horizontally from right. 17 | /// - coverHorizontalFromLeft: Slides in horizontally from left. 18 | /// - flipHorizontal: Flips new view horizontally. 19 | /// - custom: Custom transition animation provided by user. 20 | public enum TransitionType { 21 | 22 | case crossDissolve 23 | case coverVertical 24 | case coverVerticalFromTop 25 | case coverHorizontalFromRight 26 | case coverHorizontalFromLeft 27 | case flipHorizontal 28 | case coverFromCorner(Corner) 29 | case custom(PresentrAnimation) 30 | 31 | /// Associates a custom transition type to the class responsible for its animation. 32 | /// 33 | /// - Returns: PresentrAnimation subclass which conforms to 'UIViewControllerAnimatedTransitioning' to be used for the animation transition. 34 | func animation() -> PresentrAnimation { 35 | switch self { 36 | case .crossDissolve: 37 | return CrossDissolveAnimation() 38 | case .coverVertical: 39 | return CoverVerticalAnimation() 40 | case .coverVerticalFromTop: 41 | return CoverVerticalFromTopAnimation() 42 | case .coverHorizontalFromRight: 43 | return CoverHorizontalAnimation(fromRight: true) 44 | case .coverHorizontalFromLeft: 45 | return CoverHorizontalAnimation(fromRight: false) 46 | case .coverFromCorner(let corner): 47 | return CoverFromCornerAnimation(corner: corner) 48 | case .flipHorizontal: 49 | return FlipHorizontalAnimation() 50 | case .custom(let animation): 51 | return animation 52 | } 53 | } 54 | 55 | } 56 | -------------------------------------------------------------------------------- /PresentrExample/Podfile: -------------------------------------------------------------------------------- 1 | platform :ios, '9.0' 2 | use_frameworks! 3 | 4 | target 'PresentrExample' do 5 | pod 'Presentr', :path => '../' 6 | end 7 | -------------------------------------------------------------------------------- /PresentrExample/PresentrExample.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /PresentrExample/PresentrExample.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /PresentrExample/PresentrExample.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /PresentrExample/PresentrExample/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // PresentrExample 4 | // 5 | // Created by Daniel Lozano on 5/23/16. 6 | // Copyright © 2016 danielozano. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | @UIApplicationMain 12 | class AppDelegate: UIResponder, UIApplicationDelegate { 13 | 14 | var window: UIWindow? 15 | 16 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { 17 | // Override point for customization after application launch. 18 | return true 19 | } 20 | 21 | func applicationWillResignActive(_ application: UIApplication) { 22 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 23 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. 24 | } 25 | 26 | func applicationDidEnterBackground(_ application: UIApplication) { 27 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 28 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 29 | } 30 | 31 | func applicationWillEnterForeground(_ application: UIApplication) { 32 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. 33 | } 34 | 35 | func applicationDidBecomeActive(_ application: UIApplication) { 36 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 37 | } 38 | 39 | func applicationWillTerminate(_ application: UIApplication) { 40 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 41 | } 42 | 43 | } 44 | -------------------------------------------------------------------------------- /PresentrExample/PresentrExample/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "20x20", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "20x20", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "29x29", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "29x29", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "40x40", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "40x40", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "size" : "60x60", 36 | "scale" : "2x" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "size" : "60x60", 41 | "scale" : "3x" 42 | }, 43 | { 44 | "idiom" : "ios-marketing", 45 | "size" : "1024x1024", 46 | "scale" : "1x" 47 | } 48 | ], 49 | "info" : { 50 | "version" : 1, 51 | "author" : "xcode" 52 | } 53 | } -------------------------------------------------------------------------------- /PresentrExample/PresentrExample/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /PresentrExample/PresentrExample/Assets.xcassets/Logo.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "presentr.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /PresentrExample/PresentrExample/Assets.xcassets/Logo.imageset/presentr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IcaliaLabs/Presentr/bc06d3bb7e734fb8600d8a05f99a44e3af17199d/PresentrExample/PresentrExample/Assets.xcassets/Logo.imageset/presentr.png -------------------------------------------------------------------------------- /PresentrExample/PresentrExample/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /PresentrExample/PresentrExample/CustomAnimation.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CustomAnimation.swift 3 | // PresentrExample 4 | // 5 | // Created by Daniel Lozano Valdés on 12/27/16. 6 | // Copyright © 2016 danielozano. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | import Presentr 11 | 12 | class CustomAnimation: PresentrAnimation { 13 | 14 | override func transform(containerFrame: CGRect, finalFrame: CGRect) -> CGRect { 15 | return CGRect(x: 0, y: 0, width: 10, height: 10) 16 | } 17 | 18 | } 19 | -------------------------------------------------------------------------------- /PresentrExample/PresentrExample/DynamicViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // DynamicViewController.swift 3 | // PresentrExample 4 | // 5 | // Created by Daniel Lozano Valdés on 3/21/17. 6 | // Copyright © 2017 danielozano. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class DynamicViewController: UIViewController { 12 | 13 | override func viewDidLoad() { 14 | super.viewDidLoad() 15 | 16 | // Do any additional setup after loading the view. 17 | } 18 | 19 | override func didReceiveMemoryWarning() { 20 | super.didReceiveMemoryWarning() 21 | // Dispose of any resources that can be recreated. 22 | } 23 | 24 | 25 | /* 26 | // MARK: - Navigation 27 | 28 | // In a storyboard-based application, you will often want to do a little preparation before navigation 29 | override func prepare(for segue: UIStoryboardSegue, sender: Any?) { 30 | // Get the new view controller using segue.destinationViewController. 31 | // Pass the selected object to the new view controller. 32 | } 33 | */ 34 | 35 | } 36 | -------------------------------------------------------------------------------- /PresentrExample/PresentrExample/ExampleTableViewCell.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ExampleTableViewCell.swift 3 | // PresentrExample 4 | // 5 | // Created by Daniel Lozano on 11/7/16. 6 | // Copyright © 2016 danielozano. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class ExampleTableViewCell: UITableViewCell { 12 | 13 | @IBOutlet weak var exampleLabel: UILabel! 14 | 15 | override func awakeFromNib() { 16 | super.awakeFromNib() 17 | // Initialization code 18 | } 19 | 20 | override func setSelected(_ selected: Bool, animated: Bool) { 21 | super.setSelected(selected, animated: animated) 22 | 23 | // Configure the view for the selected state 24 | } 25 | 26 | } 27 | -------------------------------------------------------------------------------- /PresentrExample/PresentrExample/FirstViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // FirstViewController.swift 3 | // PresentrExample 4 | // 5 | // Created by Daniel Lozano Valdés on 3/20/17. 6 | // Copyright © 2017 danielozano. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import Presentr 11 | 12 | class FirstViewController: UIViewController { 13 | 14 | let presenter: Presentr = { 15 | let presenter = Presentr(presentationType: .alert) 16 | presenter.transitionType = .coverHorizontalFromLeft 17 | presenter.dismissTransitionType = .coverHorizontalFromRight 18 | return presenter 19 | }() 20 | 21 | var alertController: AlertViewController { 22 | let alertController = AlertViewController(title: "Are you sure? ⚠️", body: "This action can't be undone!") 23 | let cancelAction = AlertAction(title: "NO, SORRY! 😱", style: .cancel) { 24 | print("CANCEL!!") 25 | } 26 | let okAction = AlertAction(title: "DO IT! 🤘", style: .destructive) { 27 | print("OK!!") 28 | } 29 | alertController.addAction(cancelAction) 30 | alertController.addAction(okAction) 31 | return alertController 32 | } 33 | 34 | override func viewDidLoad() { 35 | super.viewDidLoad() 36 | } 37 | 38 | override func didReceiveMemoryWarning() { 39 | super.didReceiveMemoryWarning() 40 | } 41 | 42 | @IBAction func didSelectShowAlert(_ sender: Any) { 43 | presenter.viewControllerForContext = self 44 | presenter.outsideContextTap = .passthrough 45 | customPresentViewController(presenter, viewController: alertController, animated: true) 46 | } 47 | 48 | } 49 | -------------------------------------------------------------------------------- /PresentrExample/PresentrExample/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIMainStoryboardFile 28 | Main 29 | UIRequiredDeviceCapabilities 30 | 31 | armv7 32 | 33 | UIStatusBarHidden 34 | 35 | UISupportedInterfaceOrientations 36 | 37 | UIInterfaceOrientationPortrait 38 | UIInterfaceOrientationLandscapeLeft 39 | UIInterfaceOrientationLandscapeRight 40 | 41 | UIViewControllerBasedStatusBarAppearance 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /PresentrExample/PresentrExample/PasstroughExampleViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // PasstroughExampleViewController.swift 3 | // PresentrExample 4 | // 5 | // Created by Daniel Lozano Valdés on 4/28/18. 6 | // Copyright © 2018 danielozano. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import Presentr 11 | 12 | class PasstroughExampleViewController: UIViewController { 13 | 14 | let alertPresenter: Presentr = { 15 | let presenter = Presentr(presentationType: .alert) 16 | presenter.transitionType = .flipHorizontal 17 | presenter.dismissTransitionType = .flipHorizontal 18 | presenter.backgroundTap = .passthrough 19 | return presenter 20 | }() 21 | 22 | lazy var alertController: AlertViewController = { 23 | let alertController = AlertViewController(title: "Are you sure? ⚠️", body: "This action can't be undone!") 24 | let cancelAction = AlertAction(title: "NO, SORRY! 😱", style: .cancel) { 25 | print("CANCEL!!") 26 | } 27 | let okAction = AlertAction(title: "DO IT! 🤘", style: .destructive) { 28 | print("OK!!") 29 | } 30 | alertController.addAction(cancelAction) 31 | alertController.addAction(okAction) 32 | return alertController 33 | }() 34 | 35 | override func viewDidLoad() { 36 | super.viewDidLoad() 37 | } 38 | 39 | override func viewDidAppear(_ animated: Bool) { 40 | customPresentViewController(alertPresenter, viewController: alertController, animated: true) 41 | } 42 | 43 | override func didReceiveMemoryWarning() { 44 | super.didReceiveMemoryWarning() 45 | } 46 | 47 | @IBAction func userDidClick(_ sender: Any) { 48 | print("I WAS CLICKED!") 49 | dismiss(animated: true) { 50 | print("DISMISSED!") 51 | } 52 | } 53 | 54 | } 55 | -------------------------------------------------------------------------------- /PresentrExample/PresentrExample/PopupViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // PopupViewController.swift 3 | // PresentrExample 4 | // 5 | // Created by Daniel Lozano on 8/29/16. 6 | // Copyright © 2016 danielozano. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import Presentr 11 | 12 | class PopupViewController: UIViewController { 13 | 14 | @IBOutlet weak var textField: UITextField! 15 | 16 | override func viewDidLoad() { 17 | super.viewDidLoad() 18 | 19 | // Do any additional setup after loading the view. 20 | } 21 | 22 | override func didReceiveMemoryWarning() { 23 | super.didReceiveMemoryWarning() 24 | // Dispose of any resources that can be recreated. 25 | } 26 | @IBAction func didSelectDone(_ sender: AnyObject) { 27 | dismiss(animated: true, completion: nil) 28 | } 29 | 30 | 31 | } 32 | 33 | // MARK: - Presentr Delegate 34 | 35 | extension PopupViewController: PresentrDelegate { 36 | 37 | func presentrShouldDismiss(keyboardShowing: Bool) -> Bool { 38 | print("Dismissing View Controller") 39 | return !keyboardShowing 40 | } 41 | 42 | } 43 | 44 | // MARK: - UITextField Delegate 45 | 46 | extension PopupViewController: UITextFieldDelegate { 47 | 48 | func textFieldShouldReturn(_ textField: UITextField) -> Bool { 49 | textField.resignFirstResponder() 50 | return true 51 | } 52 | 53 | } 54 | -------------------------------------------------------------------------------- /PresentrExample/PresentrExample/SecondViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SecondViewController.swift 3 | // PresentrExample 4 | // 5 | // Created by Daniel Lozano Valdés on 3/20/17. 6 | // Copyright © 2017 danielozano. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class SecondViewController: UIViewController { 12 | 13 | override func viewDidLoad() { 14 | super.viewDidLoad() 15 | 16 | // Do any additional setup after loading the view. 17 | } 18 | 19 | override func didReceiveMemoryWarning() { 20 | super.didReceiveMemoryWarning() 21 | // Dispose of any resources that can be recreated. 22 | } 23 | 24 | 25 | /* 26 | // MARK: - Navigation 27 | 28 | // In a storyboard-based application, you will often want to do a little preparation before navigation 29 | override func prepare(for segue: UIStoryboardSegue, sender: Any?) { 30 | // Get the new view controller using segue.destinationViewController. 31 | // Pass the selected object to the new view controller. 32 | } 33 | */ 34 | 35 | } 36 | -------------------------------------------------------------------------------- /PresentrExample/PresentrExample/SplitViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SplitViewController.swift 3 | // PresentrExample 4 | // 5 | // Created by Daniel Lozano Valdés on 3/20/17. 6 | // Copyright © 2017 danielozano. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class SplitViewController: UIViewController { 12 | 13 | override func viewDidLoad() { 14 | super.viewDidLoad() 15 | 16 | // Do any additional setup after loading the view. 17 | } 18 | 19 | override func didReceiveMemoryWarning() { 20 | super.didReceiveMemoryWarning() 21 | // Dispose of any resources that can be recreated. 22 | } 23 | 24 | 25 | /* 26 | // MARK: - Navigation 27 | 28 | // In a storyboard-based application, you will often want to do a little preparation before navigation 29 | override func prepare(for segue: UIStoryboardSegue, sender: Any?) { 30 | // Get the new view controller using segue.destinationViewController. 31 | // Pass the selected object to the new view controller. 32 | } 33 | */ 34 | 35 | } 36 | -------------------------------------------------------------------------------- /PresentrTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /PresentrTests/PresentrTests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // PresentrTests.swift 3 | // PresentrTests 4 | // 5 | // Created by Daniel Lozano on 5/11/16. 6 | // Copyright © 2016 danielozano. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | @testable import Presentr 11 | 12 | class PresentrTests: XCTestCase { 13 | 14 | override func setUp() { 15 | super.setUp() 16 | // Put setup code here. This method is called before the invocation of each test method in the class. 17 | } 18 | 19 | override func tearDown() { 20 | // Put teardown code here. This method is called after the invocation of each test method in the class. 21 | super.tearDown() 22 | } 23 | 24 | func testExample() { 25 | // This is an example of a functional test case. 26 | // Use XCTAssert and related functions to verify your tests produce the correct results. 27 | } 28 | 29 | func testPerformanceExample() { 30 | // This is an example of a performance test case. 31 | self.measure { 32 | // Put the code you want to measure the time of here. 33 | } 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /TRANSITIONTYPE.md: -------------------------------------------------------------------------------- 1 | ## Creating a custom TransitionType 2 | 3 | To create a custom TransitionType you have to modify an existing **PresentrAnimation** or create your own. Then initialize a **.custom** TransitionType with your animation. 4 | 5 | ### Modify an existing one 6 | 7 | Here we get the existing **CoverVerticalAnimation** and modify it to create a CoverVerticalWithSpring transition. 8 | 9 | ```swift 10 | let animation = CoverVerticalAnimation(options: .spring(duration: 2.0, 11 | delay: 0, 12 | damping: 0.5, 13 | velocity: 0)) 14 | 15 | let coverVerticalWithSpring = TransitionType.custom(animation) 16 | 17 | presenter.transitionType = coverVerticalWithSpring 18 | presenter.dismissTransitionType = coverVerticalWithSpring 19 | ``` 20 | 21 | You can initialize any **PresentrAnimation** subclass with an **AnimationOptions** enum that sets the UIView animation settings to be used. 22 | 23 | ```swift 24 | public enum AnimationOptions { 25 | 26 | case normal(duration: TimeInterval) 27 | case spring(duration: TimeInterval, delay: TimeInterval, damping: CGFloat, velocity: CGFloat) 28 | 29 | } 30 | ``` 31 | 32 | For example, if you wanted to modify the **CrossDissolve** transition to be much slower, you would do it like so: 33 | 34 | ```swift 35 | let slowCrossDissolve = CrossDissolveAnimation(options: .normal(duration: 2.0)) 36 | presenter.transitionType = TransitionType.custom(slowCrossDissolve) 37 | ``` 38 | 39 | These are the included **PresentrAnimation**'s mapped to their **PresentationType**. 40 | 41 | ```swift 42 | func animation() -> PresentrAnimation { 43 | switch self { 44 | case .crossDissolve: 45 | return CrossDissolveAnimation() 46 | case .coverVertical: 47 | return CoverVerticalAnimation() 48 | case .coverVerticalFromTop: 49 | return CoverVerticalFromTopAnimation() 50 | case .coverHorizontalFromRight: 51 | return CoverHorizontalAnimation(fromRight: true) 52 | case .coverHorizontalFromLeft: 53 | return CoverHorizontalAnimation(fromRight: false) 54 | ... 55 | } 56 | } 57 | ``` 58 | 59 | ### Create your own custom PresentrAnimation 60 | 61 | - Create a class that inherits from **PresentrAnimation**. 62 | 63 | Then, either: 64 | - Override the **transform** method. It receives the Container Frame and Final Frame of the presented view controller. You need to return the Initial frame you want for the view controller, that way you can create a simple movement animation. 65 | 66 | ```swift 67 | class ExpandFromCornerAnimation: PresentrAnimation { 68 | 69 | override func transform(containerFrame: CGRect, finalFrame: CGRect) -> CGRect { 70 | return CGRect(x: 0, y: 0, width: 10, height: 10) 71 | } 72 | 73 | } 74 | ``` 75 | 76 | OR 77 | 78 | - Override both beforeAnimation and performAnimation, and optionally, afterAnimation. Take the built-in CrossDissolveAnimation as an example. 79 | 80 | ```swift 81 | public class CrossDissolveAnimation: PresentrAnimation { 82 | 83 | override public func beforeAnimation(using transitionContext: PresentrTransitionContext) { 84 | transitionContext.animatingView?.alpha = transitionContext.isPresenting ? 0.0 : 1.0 85 | } 86 | 87 | override public func performAnimation(using transitionContext: PresentrTransitionContext) { 88 | transitionContext.animatingView?.alpha = transitionContext.isPresenting ? 1.0 : 0.0 89 | } 90 | 91 | override public func afterAnimation(using transitionContext: PresentrTransitionContext) { 92 | transitionContext.animatingView?.alpha = 1.0 93 | } 94 | 95 | } 96 | ``` 97 | 98 | The framework gives you all you need via the **PresentrTransitionContext** struct which is a wrapper which gives you all you need for the animation. 99 | 100 | ```swift 101 | public struct PresentrTransitionContext { 102 | 103 | let containerView: UIView 104 | 105 | let initialFrame: CGRect 106 | 107 | let finalFrame: CGRect 108 | 109 | let isPresenting: Bool 110 | 111 | let fromViewController: UIViewController? 112 | 113 | let toViewController: UIViewController? 114 | 115 | let fromView: UIView? 116 | 117 | let toView: UIView? 118 | 119 | let animatingViewController: UIViewController? 120 | 121 | let animatingView: UIView? 122 | 123 | } 124 | ``` 125 | 126 | Finally, create a custom TransitionType with your custom animation. 127 | 128 | ```swift 129 | presenter.transitionType = .custom(ExpandFromCornerAnimation()) 130 | ``` 131 | -------------------------------------------------------------------------------- /docs/Extensions.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Extensions Reference 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 |
16 |

Presentr Docs (38% documented)

17 |
18 |
19 |
20 | 25 |
26 |
27 | 98 |
99 |
100 |
101 |

Extensions

102 |

The following extensions are available globally.

103 | 104 |
105 |
106 |
107 | 114 |
    115 |
  • 116 |
    117 | 118 | 119 | 120 | UIViewController 121 | 122 |
    123 |
    124 |
    125 |
    126 |
    127 |
    128 |

    Undocumented

    129 | 130 | See more 131 |
    132 |
    133 |
    134 |
  • 135 |
136 |
137 |
138 | 145 |
    146 |
  • 147 |
    148 | 149 | 150 | 151 | PresentrController 152 | 153 |
    154 |
    155 |
    156 |
    157 |
    158 |
    159 | 160 |
    161 |
    162 |

    Declaration

    163 |
    164 |

    Swift

    165 |
    class PresentrController : UIPresentationController, UIAdaptivePresentationControllerDelegate
    166 | 167 |
    168 |
    169 |
    170 |
    171 |
  • 172 |
173 |
174 |
175 |
176 | 180 |
181 |
182 | 183 | 184 | 185 | -------------------------------------------------------------------------------- /docs/Extensions/UIViewController.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | UIViewController Extension Reference 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 |

Presentr Docs (38% documented)

18 |
19 |
20 |
21 | 26 |
27 |
28 | 99 | 137 |
138 | 139 | 140 | 141 | -------------------------------------------------------------------------------- /docs/Functions.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Functions Reference 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 |
16 |

Presentr Docs (38% documented)

17 |
18 |
19 |
20 | 25 |
26 |
27 | 98 |
99 |
100 |
101 |

Functions

102 |

The following functions are available globally.

103 | 104 |
105 |
106 |
107 |
    108 |
  • 109 |
    110 | 111 | 112 | 113 | ==(_:_:) 114 | 115 |
    116 |
    117 |
    118 |
    119 |
    120 |
    121 |

    Undocumented

    122 | 123 |
    124 |
    125 |
    126 |
  • 127 |
  • 128 |
    129 | 130 | 131 | 132 | ==(_:_:) 133 | 134 |
    135 |
    136 |
    137 |
    138 |
    139 |
    140 |

    Undocumented

    141 | 142 |
    143 |
    144 |
    145 |
  • 146 |
  • 147 |
    148 | 149 | 150 | 151 | ==(_:_:) 152 | 153 |
    154 |
    155 |
    156 |
    157 |
    158 |
    159 |

    Undocumented

    160 | 161 |
    162 |
    163 |
    164 |
  • 165 |
166 |
167 |
168 |
169 | 173 |
174 |
175 | 176 | 177 | 178 | -------------------------------------------------------------------------------- /docs/Protocols.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Protocols Reference 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 |
16 |

Presentr Docs (17% documented)

17 |
18 |
19 |
20 | 25 |
26 |
27 | 75 |
76 |
77 |
78 |

Protocols

79 |

The following protocols are available globally.

80 | 81 |
82 |
83 |
84 | 106 |
107 |
108 |
109 | 113 |
114 |
115 | 116 | 117 | 118 | -------------------------------------------------------------------------------- /docs/Protocols/AlertViewControllerDelegate.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | AlertViewControllerDelegate Protocol Reference 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 |

Presentr Docs (17% documented)

18 |
19 |
20 |
21 | 26 |
27 |
28 | 76 |
77 |
78 |
79 |

AlertViewControllerDelegate

80 |

Undocumented

81 | 82 |
83 |
84 |
85 |
    86 |
  • 87 |
    88 | 89 | 90 | 91 | alertDidSelectCancel(_:) 92 | 93 | 94 | Default implementation 95 | 96 |
    97 |
    98 |
    99 |
    100 |
    101 |
    102 |

    Undocumented

    103 | 104 |
    105 |

    Default Implementation

    106 |
    107 |

    Undocumented

    108 | 109 |
    110 |
    111 |
    112 |
  • 113 |
  • 114 |
    115 | 116 | 117 | 118 | alertDidSelectOk(_:) 119 | 120 | 121 | Default implementation 122 | 123 |
    124 |
    125 |
    126 |
    127 |
    128 |
    129 |

    Undocumented

    130 | 131 |
    132 |

    Default Implementation

    133 |
    134 |

    Undocumented

    135 | 136 |
    137 |
    138 |
    139 |
  • 140 |
141 |
142 |
143 |
144 | 148 |
149 |
150 | 151 | 152 | 153 | -------------------------------------------------------------------------------- /docs/Typealiases.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Typealiases Reference 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 |
16 |

Presentr Docs (38% documented)

17 |
18 |
19 |
20 | 25 |
26 |
27 | 98 |
99 |
100 |
101 |

Typealiases

102 |

The following typealiases are available globally.

103 | 104 |
105 |
106 |
107 |
    108 |
  • 109 |
    110 | 111 | 112 | 113 | FrameTransformer 114 | 115 |
    116 |
    117 |
    118 |
    119 |
    120 |
    121 |

    Transform block used to obtain the initial frame for the animation, given the finalFrame and the container’s frame.

    122 | 123 |
    124 |
    125 |

    Declaration

    126 |
    127 |

    Swift

    128 |
    typealias FrameTransformer = (finalFrame: CGRect, containerFrame: CGRect) -> CGRect
    129 | 130 |
    131 |
    132 |
    133 |
    134 |
  • 135 |
136 |
137 |
138 |
139 | 143 |
144 |
145 | 146 | 147 | 148 | -------------------------------------------------------------------------------- /docs/css/highlight.css: -------------------------------------------------------------------------------- 1 | /* Credit to https://gist.github.com/wataru420/2048287 */ 2 | .highlight { 3 | /* Comment */ 4 | /* Error */ 5 | /* Keyword */ 6 | /* Operator */ 7 | /* Comment.Multiline */ 8 | /* Comment.Preproc */ 9 | /* Comment.Single */ 10 | /* Comment.Special */ 11 | /* Generic.Deleted */ 12 | /* Generic.Deleted.Specific */ 13 | /* Generic.Emph */ 14 | /* Generic.Error */ 15 | /* Generic.Heading */ 16 | /* Generic.Inserted */ 17 | /* Generic.Inserted.Specific */ 18 | /* Generic.Output */ 19 | /* Generic.Prompt */ 20 | /* Generic.Strong */ 21 | /* Generic.Subheading */ 22 | /* Generic.Traceback */ 23 | /* Keyword.Constant */ 24 | /* Keyword.Declaration */ 25 | /* Keyword.Pseudo */ 26 | /* Keyword.Reserved */ 27 | /* Keyword.Type */ 28 | /* Literal.Number */ 29 | /* Literal.String */ 30 | /* Name.Attribute */ 31 | /* Name.Builtin */ 32 | /* Name.Class */ 33 | /* Name.Constant */ 34 | /* Name.Entity */ 35 | /* Name.Exception */ 36 | /* Name.Function */ 37 | /* Name.Namespace */ 38 | /* Name.Tag */ 39 | /* Name.Variable */ 40 | /* Operator.Word */ 41 | /* Text.Whitespace */ 42 | /* Literal.Number.Float */ 43 | /* Literal.Number.Hex */ 44 | /* Literal.Number.Integer */ 45 | /* Literal.Number.Oct */ 46 | /* Literal.String.Backtick */ 47 | /* Literal.String.Char */ 48 | /* Literal.String.Doc */ 49 | /* Literal.String.Double */ 50 | /* Literal.String.Escape */ 51 | /* Literal.String.Heredoc */ 52 | /* Literal.String.Interpol */ 53 | /* Literal.String.Other */ 54 | /* Literal.String.Regex */ 55 | /* Literal.String.Single */ 56 | /* Literal.String.Symbol */ 57 | /* Name.Builtin.Pseudo */ 58 | /* Name.Variable.Class */ 59 | /* Name.Variable.Global */ 60 | /* Name.Variable.Instance */ 61 | /* Literal.Number.Integer.Long */ } 62 | .highlight .c { 63 | color: #999988; 64 | font-style: italic; } 65 | .highlight .err { 66 | color: #a61717; 67 | background-color: #e3d2d2; } 68 | .highlight .k { 69 | color: #000000; 70 | font-weight: bold; } 71 | .highlight .o { 72 | color: #000000; 73 | font-weight: bold; } 74 | .highlight .cm { 75 | color: #999988; 76 | font-style: italic; } 77 | .highlight .cp { 78 | color: #999999; 79 | font-weight: bold; } 80 | .highlight .c1 { 81 | color: #999988; 82 | font-style: italic; } 83 | .highlight .cs { 84 | color: #999999; 85 | font-weight: bold; 86 | font-style: italic; } 87 | .highlight .gd { 88 | color: #000000; 89 | background-color: #ffdddd; } 90 | .highlight .gd .x { 91 | color: #000000; 92 | background-color: #ffaaaa; } 93 | .highlight .ge { 94 | color: #000000; 95 | font-style: italic; } 96 | .highlight .gr { 97 | color: #aa0000; } 98 | .highlight .gh { 99 | color: #999999; } 100 | .highlight .gi { 101 | color: #000000; 102 | background-color: #ddffdd; } 103 | .highlight .gi .x { 104 | color: #000000; 105 | background-color: #aaffaa; } 106 | .highlight .go { 107 | color: #888888; } 108 | .highlight .gp { 109 | color: #555555; } 110 | .highlight .gs { 111 | font-weight: bold; } 112 | .highlight .gu { 113 | color: #aaaaaa; } 114 | .highlight .gt { 115 | color: #aa0000; } 116 | .highlight .kc { 117 | color: #000000; 118 | font-weight: bold; } 119 | .highlight .kd { 120 | color: #000000; 121 | font-weight: bold; } 122 | .highlight .kp { 123 | color: #000000; 124 | font-weight: bold; } 125 | .highlight .kr { 126 | color: #000000; 127 | font-weight: bold; } 128 | .highlight .kt { 129 | color: #445588; } 130 | .highlight .m { 131 | color: #009999; } 132 | .highlight .s { 133 | color: #d14; } 134 | .highlight .na { 135 | color: #008080; } 136 | .highlight .nb { 137 | color: #0086B3; } 138 | .highlight .nc { 139 | color: #445588; 140 | font-weight: bold; } 141 | .highlight .no { 142 | color: #008080; } 143 | .highlight .ni { 144 | color: #800080; } 145 | .highlight .ne { 146 | color: #990000; 147 | font-weight: bold; } 148 | .highlight .nf { 149 | color: #990000; } 150 | .highlight .nn { 151 | color: #555555; } 152 | .highlight .nt { 153 | color: #000080; } 154 | .highlight .nv { 155 | color: #008080; } 156 | .highlight .ow { 157 | color: #000000; 158 | font-weight: bold; } 159 | .highlight .w { 160 | color: #bbbbbb; } 161 | .highlight .mf { 162 | color: #009999; } 163 | .highlight .mh { 164 | color: #009999; } 165 | .highlight .mi { 166 | color: #009999; } 167 | .highlight .mo { 168 | color: #009999; } 169 | .highlight .sb { 170 | color: #d14; } 171 | .highlight .sc { 172 | color: #d14; } 173 | .highlight .sd { 174 | color: #d14; } 175 | .highlight .s2 { 176 | color: #d14; } 177 | .highlight .se { 178 | color: #d14; } 179 | .highlight .sh { 180 | color: #d14; } 181 | .highlight .si { 182 | color: #d14; } 183 | .highlight .sx { 184 | color: #d14; } 185 | .highlight .sr { 186 | color: #009926; } 187 | .highlight .s1 { 188 | color: #d14; } 189 | .highlight .ss { 190 | color: #990073; } 191 | .highlight .bp { 192 | color: #999999; } 193 | .highlight .vc { 194 | color: #008080; } 195 | .highlight .vg { 196 | color: #008080; } 197 | .highlight .vi { 198 | color: #008080; } 199 | .highlight .il { 200 | color: #009999; } 201 | -------------------------------------------------------------------------------- /docs/css/jazzy.css: -------------------------------------------------------------------------------- 1 | html, body, div, span, h1, h3, h4, p, a, code, em, img, ul, li, table, tbody, tr, td { 2 | background: transparent; 3 | border: 0; 4 | margin: 0; 5 | outline: 0; 6 | padding: 0; 7 | vertical-align: baseline; } 8 | 9 | body { 10 | background-color: #f2f2f2; 11 | font-family: Helvetica, freesans, Arial, sans-serif; 12 | font-size: 14px; 13 | -webkit-font-smoothing: subpixel-antialiased; 14 | word-wrap: break-word; } 15 | 16 | h1, h2, h3 { 17 | margin-top: 0.8em; 18 | margin-bottom: 0.3em; 19 | font-weight: 100; 20 | color: black; } 21 | 22 | h1 { 23 | font-size: 2.5em; } 24 | 25 | h2 { 26 | font-size: 2em; 27 | border-bottom: 1px solid #e2e2e2; } 28 | 29 | h4 { 30 | font-size: 13px; 31 | line-height: 1.5; 32 | margin-top: 21px; } 33 | 34 | h5 { 35 | font-size: 1.1em; } 36 | 37 | h6 { 38 | font-size: 1.1em; 39 | color: #777; } 40 | 41 | .section-name { 42 | color: gray; 43 | display: block; 44 | font-family: Helvetica; 45 | font-size: 22px; 46 | font-weight: 100; 47 | margin-bottom: 15px; } 48 | 49 | pre, code { 50 | font: 0.95em Menlo, monospace; 51 | color: #777; 52 | word-wrap: normal; } 53 | 54 | p code, li code { 55 | background-color: #eee; 56 | padding: 2px 4px; 57 | border-radius: 4px; } 58 | 59 | a { 60 | color: #0088cc; 61 | text-decoration: none; } 62 | 63 | ul { 64 | padding-left: 15px; } 65 | 66 | li { 67 | line-height: 1.8em; } 68 | 69 | img { 70 | max-width: 100%; } 71 | 72 | blockquote { 73 | margin-left: 0; 74 | padding: 0 10px; 75 | border-left: 4px solid #ccc; } 76 | 77 | .content-wrapper { 78 | margin: 0 auto; 79 | width: 980px; } 80 | 81 | header { 82 | font-size: 0.85em; 83 | line-height: 26px; 84 | background-color: #414141; 85 | position: fixed; 86 | width: 100%; 87 | z-index: 1; } 88 | header img { 89 | padding-right: 6px; 90 | vertical-align: -4px; 91 | height: 16px; } 92 | header a { 93 | color: #fff; } 94 | header p { 95 | float: left; 96 | color: #999; } 97 | header .header-right { 98 | float: right; 99 | margin-left: 16px; } 100 | 101 | #breadcrumbs { 102 | background-color: #f2f2f2; 103 | height: 27px; 104 | padding-top: 17px; 105 | position: fixed; 106 | width: 100%; 107 | z-index: 1; 108 | margin-top: 26px; } 109 | #breadcrumbs #carat { 110 | height: 10px; 111 | margin: 0 5px; } 112 | 113 | .sidebar { 114 | background-color: #f9f9f9; 115 | border: 1px solid #e2e2e2; 116 | overflow-y: auto; 117 | overflow-x: hidden; 118 | position: fixed; 119 | top: 70px; 120 | bottom: 0; 121 | width: 230px; 122 | word-wrap: normal; } 123 | 124 | .nav-groups { 125 | list-style-type: none; 126 | background: #fff; 127 | padding-left: 0; } 128 | 129 | .nav-group-name { 130 | border-bottom: 1px solid #e2e2e2; 131 | font-size: 1.1em; 132 | font-weight: 100; 133 | padding: 15px 0 15px 20px; } 134 | .nav-group-name > a { 135 | color: #333; } 136 | 137 | .nav-group-tasks { 138 | margin-top: 5px; } 139 | 140 | .nav-group-task { 141 | font-size: 0.9em; 142 | list-style-type: none; } 143 | .nav-group-task a { 144 | color: #888; } 145 | 146 | .main-content { 147 | background-color: #fff; 148 | border: 1px solid #e2e2e2; 149 | margin-left: 246px; 150 | position: absolute; 151 | overflow: hidden; 152 | padding-bottom: 60px; 153 | top: 70px; 154 | width: 734px; } 155 | .main-content p, .main-content a, .main-content code, .main-content em, .main-content ul, .main-content table, .main-content blockquote { 156 | margin-bottom: 1em; } 157 | .main-content p { 158 | line-height: 1.8em; } 159 | .main-content section .section:first-child { 160 | margin-top: 0; 161 | padding-top: 0; } 162 | .main-content section .task-group-section .task-group:first-of-type { 163 | padding-top: 10px; } 164 | .main-content section .task-group-section .task-group:first-of-type .section-name { 165 | padding-top: 15px; } 166 | 167 | .section { 168 | padding: 0 25px; } 169 | 170 | .highlight { 171 | background-color: #eee; 172 | padding: 10px 12px; 173 | border: 1px solid #e2e2e2; 174 | border-radius: 4px; 175 | overflow-x: auto; } 176 | 177 | .declaration .highlight { 178 | overflow-x: initial; 179 | padding: 0 40px 40px 0; 180 | margin-bottom: -25px; 181 | background-color: transparent; 182 | border: none; } 183 | 184 | .section-name { 185 | margin: 0; 186 | margin-left: 18px; } 187 | 188 | .task-group-section { 189 | padding-left: 6px; 190 | border-top: 1px solid #e2e2e2; } 191 | 192 | .task-group { 193 | padding-top: 0px; } 194 | 195 | .task-name-container a[name]:before { 196 | content: ""; 197 | display: block; 198 | padding-top: 70px; 199 | margin: -70px 0 0; } 200 | 201 | .item { 202 | padding-top: 8px; 203 | width: 100%; 204 | list-style-type: none; } 205 | .item a[name]:before { 206 | content: ""; 207 | display: block; 208 | padding-top: 70px; 209 | margin: -70px 0 0; } 210 | .item code { 211 | background-color: transparent; 212 | padding: 0; } 213 | .item .token { 214 | padding-left: 3px; 215 | margin-left: 15px; 216 | font-size: 11.9px; } 217 | .item .declaration-note { 218 | font-size: .85em; 219 | color: gray; 220 | font-style: italic; } 221 | 222 | .pointer-container { 223 | border-bottom: 1px solid #e2e2e2; 224 | left: -23px; 225 | padding-bottom: 13px; 226 | position: relative; 227 | width: 110%; } 228 | 229 | .pointer { 230 | background: #f9f9f9; 231 | border-left: 1px solid #e2e2e2; 232 | border-top: 1px solid #e2e2e2; 233 | height: 12px; 234 | left: 21px; 235 | top: -7px; 236 | -webkit-transform: rotate(45deg); 237 | -moz-transform: rotate(45deg); 238 | -o-transform: rotate(45deg); 239 | transform: rotate(45deg); 240 | position: absolute; 241 | width: 12px; } 242 | 243 | .height-container { 244 | display: none; 245 | left: -25px; 246 | padding: 0 25px; 247 | position: relative; 248 | width: 100%; 249 | overflow: hidden; } 250 | .height-container .section { 251 | background: #f9f9f9; 252 | border-bottom: 1px solid #e2e2e2; 253 | left: -25px; 254 | position: relative; 255 | width: 100%; 256 | padding-top: 10px; 257 | padding-bottom: 5px; } 258 | 259 | .aside, .language { 260 | padding: 6px 12px; 261 | margin: 12px 0; 262 | border-left: 5px solid #dddddd; 263 | overflow-y: hidden; } 264 | .aside .aside-title, .language .aside-title { 265 | font-size: 9px; 266 | letter-spacing: 2px; 267 | text-transform: uppercase; 268 | padding-bottom: 0; 269 | margin: 0; 270 | color: #aaa; 271 | -webkit-user-select: none; } 272 | .aside p:last-child, .language p:last-child { 273 | margin-bottom: 0; } 274 | 275 | .language { 276 | border-left: 5px solid #cde9f4; } 277 | .language .aside-title { 278 | color: #4b8afb; } 279 | 280 | .aside-warning { 281 | border-left: 5px solid #ff6666; } 282 | .aside-warning .aside-title { 283 | color: #ff0000; } 284 | 285 | .graybox { 286 | border-collapse: collapse; 287 | width: 100%; } 288 | .graybox p { 289 | margin: 0; 290 | word-break: break-word; 291 | min-width: 50px; } 292 | .graybox td { 293 | border: 1px solid #e2e2e2; 294 | padding: 5px 25px 5px 10px; 295 | vertical-align: middle; } 296 | .graybox tr td:first-of-type { 297 | text-align: right; 298 | padding: 7px; 299 | vertical-align: top; 300 | word-break: normal; 301 | width: 40px; } 302 | 303 | .slightly-smaller { 304 | font-size: 0.9em; } 305 | 306 | #footer { 307 | position: absolute; 308 | bottom: 10px; 309 | margin-left: 25px; } 310 | #footer p { 311 | margin: 0; 312 | color: #aaa; 313 | font-size: 0.8em; } 314 | 315 | html.dash header, html.dash #breadcrumbs, html.dash .sidebar { 316 | display: none; } 317 | html.dash .main-content { 318 | width: 980px; 319 | margin-left: 0; 320 | border: none; 321 | width: 100%; 322 | top: 0; 323 | padding-bottom: 0; } 324 | html.dash .height-container { 325 | display: block; } 326 | html.dash .item .token { 327 | margin-left: 0; } 328 | html.dash .content-wrapper { 329 | width: auto; } 330 | html.dash #footer { 331 | position: static; } 332 | -------------------------------------------------------------------------------- /docs/docsets/Presentr.docset/Contents/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleIdentifier 6 | com.jazzy.presentr 7 | CFBundleName 8 | Presentr 9 | DocSetPlatformFamily 10 | jazzy 11 | isDashDocset 12 | 13 | dashIndexFilePath 14 | index.html 15 | isJavaScriptEnabled 16 | 17 | DashDocSetFamily 18 | dashtoc 19 | 20 | 21 | -------------------------------------------------------------------------------- /docs/docsets/Presentr.docset/Contents/Resources/Documents/Extensions.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Extensions Reference 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 |
16 |

Presentr Docs (38% documented)

17 |
18 |
19 |
20 | 25 |
26 |
27 | 98 |
99 |
100 |
101 |

Extensions

102 |

The following extensions are available globally.

103 | 104 |
105 |
106 |
107 | 114 |
    115 |
  • 116 |
    117 | 118 | 119 | 120 | UIViewController 121 | 122 |
    123 |
    124 |
    125 |
    126 |
    127 |
    128 |

    Undocumented

    129 | 130 | See more 131 |
    132 |
    133 |
    134 |
  • 135 |
136 |
137 |
138 | 145 |
    146 |
  • 147 |
    148 | 149 | 150 | 151 | PresentrController 152 | 153 |
    154 |
    155 |
    156 |
    157 |
    158 |
    159 | 160 |
    161 |
    162 |

    Declaration

    163 |
    164 |

    Swift

    165 |
    class PresentrController : UIPresentationController, UIAdaptivePresentationControllerDelegate
    166 | 167 |
    168 |
    169 |
    170 |
    171 |
  • 172 |
173 |
174 |
175 |
176 | 180 |
181 |
182 | 183 | 184 | 185 | -------------------------------------------------------------------------------- /docs/docsets/Presentr.docset/Contents/Resources/Documents/Extensions/UIViewController.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | UIViewController Extension Reference 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 |

Presentr Docs (38% documented)

18 |
19 |
20 |
21 | 26 |
27 |
28 | 99 | 137 |
138 | 139 | 140 | 141 | -------------------------------------------------------------------------------- /docs/docsets/Presentr.docset/Contents/Resources/Documents/Functions.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Functions Reference 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 |
16 |

Presentr Docs (38% documented)

17 |
18 |
19 |
20 | 25 |
26 |
27 | 98 |
99 |
100 |
101 |

Functions

102 |

The following functions are available globally.

103 | 104 |
105 |
106 |
107 |
    108 |
  • 109 |
    110 | 111 | 112 | 113 | ==(_:_:) 114 | 115 |
    116 |
    117 |
    118 |
    119 |
    120 |
    121 |

    Undocumented

    122 | 123 |
    124 |
    125 |
    126 |
  • 127 |
  • 128 |
    129 | 130 | 131 | 132 | ==(_:_:) 133 | 134 |
    135 |
    136 |
    137 |
    138 |
    139 |
    140 |

    Undocumented

    141 | 142 |
    143 |
    144 |
    145 |
  • 146 |
  • 147 |
    148 | 149 | 150 | 151 | ==(_:_:) 152 | 153 |
    154 |
    155 |
    156 |
    157 |
    158 |
    159 |

    Undocumented

    160 | 161 |
    162 |
    163 |
    164 |
  • 165 |
166 |
167 |
168 |
169 | 173 |
174 |
175 | 176 | 177 | 178 | -------------------------------------------------------------------------------- /docs/docsets/Presentr.docset/Contents/Resources/Documents/Protocols.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Protocols Reference 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 |
16 |

Presentr Docs (17% documented)

17 |
18 |
19 |
20 | 25 |
26 |
27 | 75 |
76 |
77 |
78 |

Protocols

79 |

The following protocols are available globally.

80 | 81 |
82 |
83 |
84 | 106 |
107 |
108 |
109 | 113 |
114 |
115 | 116 | 117 | 118 | -------------------------------------------------------------------------------- /docs/docsets/Presentr.docset/Contents/Resources/Documents/Protocols/AlertViewControllerDelegate.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | AlertViewControllerDelegate Protocol Reference 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 |

Presentr Docs (17% documented)

18 |
19 |
20 |
21 | 26 |
27 |
28 | 76 |
77 |
78 |
79 |

AlertViewControllerDelegate

80 |

Undocumented

81 | 82 |
83 |
84 |
85 |
    86 |
  • 87 |
    88 | 89 | 90 | 91 | alertDidSelectCancel(_:) 92 | 93 | 94 | Default implementation 95 | 96 |
    97 |
    98 |
    99 |
    100 |
    101 |
    102 |

    Undocumented

    103 | 104 |
    105 |

    Default Implementation

    106 |
    107 |

    Undocumented

    108 | 109 |
    110 |
    111 |
    112 |
  • 113 |
  • 114 |
    115 | 116 | 117 | 118 | alertDidSelectOk(_:) 119 | 120 | 121 | Default implementation 122 | 123 |
    124 |
    125 |
    126 |
    127 |
    128 |
    129 |

    Undocumented

    130 | 131 |
    132 |

    Default Implementation

    133 |
    134 |

    Undocumented

    135 | 136 |
    137 |
    138 |
    139 |
  • 140 |
141 |
142 |
143 |
144 | 148 |
149 |
150 | 151 | 152 | 153 | -------------------------------------------------------------------------------- /docs/docsets/Presentr.docset/Contents/Resources/Documents/Typealiases.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Typealiases Reference 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 |
16 |

Presentr Docs (38% documented)

17 |
18 |
19 |
20 | 25 |
26 |
27 | 98 |
99 |
100 |
101 |

Typealiases

102 |

The following typealiases are available globally.

103 | 104 |
105 |
106 |
107 |
    108 |
  • 109 |
    110 | 111 | 112 | 113 | FrameTransformer 114 | 115 |
    116 |
    117 |
    118 |
    119 |
    120 |
    121 |

    Transform block used to obtain the initial frame for the animation, given the finalFrame and the container’s frame.

    122 | 123 |
    124 |
    125 |

    Declaration

    126 |
    127 |

    Swift

    128 |
    typealias FrameTransformer = (finalFrame: CGRect, containerFrame: CGRect) -> CGRect
    129 | 130 |
    131 |
    132 |
    133 |
    134 |
  • 135 |
136 |
137 |
138 |
139 | 143 |
144 |
145 | 146 | 147 | 148 | -------------------------------------------------------------------------------- /docs/docsets/Presentr.docset/Contents/Resources/Documents/css/highlight.css: -------------------------------------------------------------------------------- 1 | /* Credit to https://gist.github.com/wataru420/2048287 */ 2 | .highlight { 3 | /* Comment */ 4 | /* Error */ 5 | /* Keyword */ 6 | /* Operator */ 7 | /* Comment.Multiline */ 8 | /* Comment.Preproc */ 9 | /* Comment.Single */ 10 | /* Comment.Special */ 11 | /* Generic.Deleted */ 12 | /* Generic.Deleted.Specific */ 13 | /* Generic.Emph */ 14 | /* Generic.Error */ 15 | /* Generic.Heading */ 16 | /* Generic.Inserted */ 17 | /* Generic.Inserted.Specific */ 18 | /* Generic.Output */ 19 | /* Generic.Prompt */ 20 | /* Generic.Strong */ 21 | /* Generic.Subheading */ 22 | /* Generic.Traceback */ 23 | /* Keyword.Constant */ 24 | /* Keyword.Declaration */ 25 | /* Keyword.Pseudo */ 26 | /* Keyword.Reserved */ 27 | /* Keyword.Type */ 28 | /* Literal.Number */ 29 | /* Literal.String */ 30 | /* Name.Attribute */ 31 | /* Name.Builtin */ 32 | /* Name.Class */ 33 | /* Name.Constant */ 34 | /* Name.Entity */ 35 | /* Name.Exception */ 36 | /* Name.Function */ 37 | /* Name.Namespace */ 38 | /* Name.Tag */ 39 | /* Name.Variable */ 40 | /* Operator.Word */ 41 | /* Text.Whitespace */ 42 | /* Literal.Number.Float */ 43 | /* Literal.Number.Hex */ 44 | /* Literal.Number.Integer */ 45 | /* Literal.Number.Oct */ 46 | /* Literal.String.Backtick */ 47 | /* Literal.String.Char */ 48 | /* Literal.String.Doc */ 49 | /* Literal.String.Double */ 50 | /* Literal.String.Escape */ 51 | /* Literal.String.Heredoc */ 52 | /* Literal.String.Interpol */ 53 | /* Literal.String.Other */ 54 | /* Literal.String.Regex */ 55 | /* Literal.String.Single */ 56 | /* Literal.String.Symbol */ 57 | /* Name.Builtin.Pseudo */ 58 | /* Name.Variable.Class */ 59 | /* Name.Variable.Global */ 60 | /* Name.Variable.Instance */ 61 | /* Literal.Number.Integer.Long */ } 62 | .highlight .c { 63 | color: #999988; 64 | font-style: italic; } 65 | .highlight .err { 66 | color: #a61717; 67 | background-color: #e3d2d2; } 68 | .highlight .k { 69 | color: #000000; 70 | font-weight: bold; } 71 | .highlight .o { 72 | color: #000000; 73 | font-weight: bold; } 74 | .highlight .cm { 75 | color: #999988; 76 | font-style: italic; } 77 | .highlight .cp { 78 | color: #999999; 79 | font-weight: bold; } 80 | .highlight .c1 { 81 | color: #999988; 82 | font-style: italic; } 83 | .highlight .cs { 84 | color: #999999; 85 | font-weight: bold; 86 | font-style: italic; } 87 | .highlight .gd { 88 | color: #000000; 89 | background-color: #ffdddd; } 90 | .highlight .gd .x { 91 | color: #000000; 92 | background-color: #ffaaaa; } 93 | .highlight .ge { 94 | color: #000000; 95 | font-style: italic; } 96 | .highlight .gr { 97 | color: #aa0000; } 98 | .highlight .gh { 99 | color: #999999; } 100 | .highlight .gi { 101 | color: #000000; 102 | background-color: #ddffdd; } 103 | .highlight .gi .x { 104 | color: #000000; 105 | background-color: #aaffaa; } 106 | .highlight .go { 107 | color: #888888; } 108 | .highlight .gp { 109 | color: #555555; } 110 | .highlight .gs { 111 | font-weight: bold; } 112 | .highlight .gu { 113 | color: #aaaaaa; } 114 | .highlight .gt { 115 | color: #aa0000; } 116 | .highlight .kc { 117 | color: #000000; 118 | font-weight: bold; } 119 | .highlight .kd { 120 | color: #000000; 121 | font-weight: bold; } 122 | .highlight .kp { 123 | color: #000000; 124 | font-weight: bold; } 125 | .highlight .kr { 126 | color: #000000; 127 | font-weight: bold; } 128 | .highlight .kt { 129 | color: #445588; } 130 | .highlight .m { 131 | color: #009999; } 132 | .highlight .s { 133 | color: #d14; } 134 | .highlight .na { 135 | color: #008080; } 136 | .highlight .nb { 137 | color: #0086B3; } 138 | .highlight .nc { 139 | color: #445588; 140 | font-weight: bold; } 141 | .highlight .no { 142 | color: #008080; } 143 | .highlight .ni { 144 | color: #800080; } 145 | .highlight .ne { 146 | color: #990000; 147 | font-weight: bold; } 148 | .highlight .nf { 149 | color: #990000; } 150 | .highlight .nn { 151 | color: #555555; } 152 | .highlight .nt { 153 | color: #000080; } 154 | .highlight .nv { 155 | color: #008080; } 156 | .highlight .ow { 157 | color: #000000; 158 | font-weight: bold; } 159 | .highlight .w { 160 | color: #bbbbbb; } 161 | .highlight .mf { 162 | color: #009999; } 163 | .highlight .mh { 164 | color: #009999; } 165 | .highlight .mi { 166 | color: #009999; } 167 | .highlight .mo { 168 | color: #009999; } 169 | .highlight .sb { 170 | color: #d14; } 171 | .highlight .sc { 172 | color: #d14; } 173 | .highlight .sd { 174 | color: #d14; } 175 | .highlight .s2 { 176 | color: #d14; } 177 | .highlight .se { 178 | color: #d14; } 179 | .highlight .sh { 180 | color: #d14; } 181 | .highlight .si { 182 | color: #d14; } 183 | .highlight .sx { 184 | color: #d14; } 185 | .highlight .sr { 186 | color: #009926; } 187 | .highlight .s1 { 188 | color: #d14; } 189 | .highlight .ss { 190 | color: #990073; } 191 | .highlight .bp { 192 | color: #999999; } 193 | .highlight .vc { 194 | color: #008080; } 195 | .highlight .vg { 196 | color: #008080; } 197 | .highlight .vi { 198 | color: #008080; } 199 | .highlight .il { 200 | color: #009999; } 201 | -------------------------------------------------------------------------------- /docs/docsets/Presentr.docset/Contents/Resources/Documents/css/jazzy.css: -------------------------------------------------------------------------------- 1 | html, body, div, span, h1, h3, h4, p, a, code, em, img, ul, li, table, tbody, tr, td { 2 | background: transparent; 3 | border: 0; 4 | margin: 0; 5 | outline: 0; 6 | padding: 0; 7 | vertical-align: baseline; } 8 | 9 | body { 10 | background-color: #f2f2f2; 11 | font-family: Helvetica, freesans, Arial, sans-serif; 12 | font-size: 14px; 13 | -webkit-font-smoothing: subpixel-antialiased; 14 | word-wrap: break-word; } 15 | 16 | h1, h2, h3 { 17 | margin-top: 0.8em; 18 | margin-bottom: 0.3em; 19 | font-weight: 100; 20 | color: black; } 21 | 22 | h1 { 23 | font-size: 2.5em; } 24 | 25 | h2 { 26 | font-size: 2em; 27 | border-bottom: 1px solid #e2e2e2; } 28 | 29 | h4 { 30 | font-size: 13px; 31 | line-height: 1.5; 32 | margin-top: 21px; } 33 | 34 | h5 { 35 | font-size: 1.1em; } 36 | 37 | h6 { 38 | font-size: 1.1em; 39 | color: #777; } 40 | 41 | .section-name { 42 | color: gray; 43 | display: block; 44 | font-family: Helvetica; 45 | font-size: 22px; 46 | font-weight: 100; 47 | margin-bottom: 15px; } 48 | 49 | pre, code { 50 | font: 0.95em Menlo, monospace; 51 | color: #777; 52 | word-wrap: normal; } 53 | 54 | p code, li code { 55 | background-color: #eee; 56 | padding: 2px 4px; 57 | border-radius: 4px; } 58 | 59 | a { 60 | color: #0088cc; 61 | text-decoration: none; } 62 | 63 | ul { 64 | padding-left: 15px; } 65 | 66 | li { 67 | line-height: 1.8em; } 68 | 69 | img { 70 | max-width: 100%; } 71 | 72 | blockquote { 73 | margin-left: 0; 74 | padding: 0 10px; 75 | border-left: 4px solid #ccc; } 76 | 77 | .content-wrapper { 78 | margin: 0 auto; 79 | width: 980px; } 80 | 81 | header { 82 | font-size: 0.85em; 83 | line-height: 26px; 84 | background-color: #414141; 85 | position: fixed; 86 | width: 100%; 87 | z-index: 1; } 88 | header img { 89 | padding-right: 6px; 90 | vertical-align: -4px; 91 | height: 16px; } 92 | header a { 93 | color: #fff; } 94 | header p { 95 | float: left; 96 | color: #999; } 97 | header .header-right { 98 | float: right; 99 | margin-left: 16px; } 100 | 101 | #breadcrumbs { 102 | background-color: #f2f2f2; 103 | height: 27px; 104 | padding-top: 17px; 105 | position: fixed; 106 | width: 100%; 107 | z-index: 1; 108 | margin-top: 26px; } 109 | #breadcrumbs #carat { 110 | height: 10px; 111 | margin: 0 5px; } 112 | 113 | .sidebar { 114 | background-color: #f9f9f9; 115 | border: 1px solid #e2e2e2; 116 | overflow-y: auto; 117 | overflow-x: hidden; 118 | position: fixed; 119 | top: 70px; 120 | bottom: 0; 121 | width: 230px; 122 | word-wrap: normal; } 123 | 124 | .nav-groups { 125 | list-style-type: none; 126 | background: #fff; 127 | padding-left: 0; } 128 | 129 | .nav-group-name { 130 | border-bottom: 1px solid #e2e2e2; 131 | font-size: 1.1em; 132 | font-weight: 100; 133 | padding: 15px 0 15px 20px; } 134 | .nav-group-name > a { 135 | color: #333; } 136 | 137 | .nav-group-tasks { 138 | margin-top: 5px; } 139 | 140 | .nav-group-task { 141 | font-size: 0.9em; 142 | list-style-type: none; } 143 | .nav-group-task a { 144 | color: #888; } 145 | 146 | .main-content { 147 | background-color: #fff; 148 | border: 1px solid #e2e2e2; 149 | margin-left: 246px; 150 | position: absolute; 151 | overflow: hidden; 152 | padding-bottom: 60px; 153 | top: 70px; 154 | width: 734px; } 155 | .main-content p, .main-content a, .main-content code, .main-content em, .main-content ul, .main-content table, .main-content blockquote { 156 | margin-bottom: 1em; } 157 | .main-content p { 158 | line-height: 1.8em; } 159 | .main-content section .section:first-child { 160 | margin-top: 0; 161 | padding-top: 0; } 162 | .main-content section .task-group-section .task-group:first-of-type { 163 | padding-top: 10px; } 164 | .main-content section .task-group-section .task-group:first-of-type .section-name { 165 | padding-top: 15px; } 166 | 167 | .section { 168 | padding: 0 25px; } 169 | 170 | .highlight { 171 | background-color: #eee; 172 | padding: 10px 12px; 173 | border: 1px solid #e2e2e2; 174 | border-radius: 4px; 175 | overflow-x: auto; } 176 | 177 | .declaration .highlight { 178 | overflow-x: initial; 179 | padding: 0 40px 40px 0; 180 | margin-bottom: -25px; 181 | background-color: transparent; 182 | border: none; } 183 | 184 | .section-name { 185 | margin: 0; 186 | margin-left: 18px; } 187 | 188 | .task-group-section { 189 | padding-left: 6px; 190 | border-top: 1px solid #e2e2e2; } 191 | 192 | .task-group { 193 | padding-top: 0px; } 194 | 195 | .task-name-container a[name]:before { 196 | content: ""; 197 | display: block; 198 | padding-top: 70px; 199 | margin: -70px 0 0; } 200 | 201 | .item { 202 | padding-top: 8px; 203 | width: 100%; 204 | list-style-type: none; } 205 | .item a[name]:before { 206 | content: ""; 207 | display: block; 208 | padding-top: 70px; 209 | margin: -70px 0 0; } 210 | .item code { 211 | background-color: transparent; 212 | padding: 0; } 213 | .item .token { 214 | padding-left: 3px; 215 | margin-left: 15px; 216 | font-size: 11.9px; } 217 | .item .declaration-note { 218 | font-size: .85em; 219 | color: gray; 220 | font-style: italic; } 221 | 222 | .pointer-container { 223 | border-bottom: 1px solid #e2e2e2; 224 | left: -23px; 225 | padding-bottom: 13px; 226 | position: relative; 227 | width: 110%; } 228 | 229 | .pointer { 230 | background: #f9f9f9; 231 | border-left: 1px solid #e2e2e2; 232 | border-top: 1px solid #e2e2e2; 233 | height: 12px; 234 | left: 21px; 235 | top: -7px; 236 | -webkit-transform: rotate(45deg); 237 | -moz-transform: rotate(45deg); 238 | -o-transform: rotate(45deg); 239 | transform: rotate(45deg); 240 | position: absolute; 241 | width: 12px; } 242 | 243 | .height-container { 244 | display: none; 245 | left: -25px; 246 | padding: 0 25px; 247 | position: relative; 248 | width: 100%; 249 | overflow: hidden; } 250 | .height-container .section { 251 | background: #f9f9f9; 252 | border-bottom: 1px solid #e2e2e2; 253 | left: -25px; 254 | position: relative; 255 | width: 100%; 256 | padding-top: 10px; 257 | padding-bottom: 5px; } 258 | 259 | .aside, .language { 260 | padding: 6px 12px; 261 | margin: 12px 0; 262 | border-left: 5px solid #dddddd; 263 | overflow-y: hidden; } 264 | .aside .aside-title, .language .aside-title { 265 | font-size: 9px; 266 | letter-spacing: 2px; 267 | text-transform: uppercase; 268 | padding-bottom: 0; 269 | margin: 0; 270 | color: #aaa; 271 | -webkit-user-select: none; } 272 | .aside p:last-child, .language p:last-child { 273 | margin-bottom: 0; } 274 | 275 | .language { 276 | border-left: 5px solid #cde9f4; } 277 | .language .aside-title { 278 | color: #4b8afb; } 279 | 280 | .aside-warning { 281 | border-left: 5px solid #ff6666; } 282 | .aside-warning .aside-title { 283 | color: #ff0000; } 284 | 285 | .graybox { 286 | border-collapse: collapse; 287 | width: 100%; } 288 | .graybox p { 289 | margin: 0; 290 | word-break: break-word; 291 | min-width: 50px; } 292 | .graybox td { 293 | border: 1px solid #e2e2e2; 294 | padding: 5px 25px 5px 10px; 295 | vertical-align: middle; } 296 | .graybox tr td:first-of-type { 297 | text-align: right; 298 | padding: 7px; 299 | vertical-align: top; 300 | word-break: normal; 301 | width: 40px; } 302 | 303 | .slightly-smaller { 304 | font-size: 0.9em; } 305 | 306 | #footer { 307 | position: absolute; 308 | bottom: 10px; 309 | margin-left: 25px; } 310 | #footer p { 311 | margin: 0; 312 | color: #aaa; 313 | font-size: 0.8em; } 314 | 315 | html.dash header, html.dash #breadcrumbs, html.dash .sidebar { 316 | display: none; } 317 | html.dash .main-content { 318 | width: 980px; 319 | margin-left: 0; 320 | border: none; 321 | width: 100%; 322 | top: 0; 323 | padding-bottom: 0; } 324 | html.dash .height-container { 325 | display: block; } 326 | html.dash .item .token { 327 | margin-left: 0; } 328 | html.dash .content-wrapper { 329 | width: auto; } 330 | html.dash #footer { 331 | position: static; } 332 | -------------------------------------------------------------------------------- /docs/docsets/Presentr.docset/Contents/Resources/Documents/img/carat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IcaliaLabs/Presentr/bc06d3bb7e734fb8600d8a05f99a44e3af17199d/docs/docsets/Presentr.docset/Contents/Resources/Documents/img/carat.png -------------------------------------------------------------------------------- /docs/docsets/Presentr.docset/Contents/Resources/Documents/img/dash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IcaliaLabs/Presentr/bc06d3bb7e734fb8600d8a05f99a44e3af17199d/docs/docsets/Presentr.docset/Contents/Resources/Documents/img/dash.png -------------------------------------------------------------------------------- /docs/docsets/Presentr.docset/Contents/Resources/Documents/img/gh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IcaliaLabs/Presentr/bc06d3bb7e734fb8600d8a05f99a44e3af17199d/docs/docsets/Presentr.docset/Contents/Resources/Documents/img/gh.png -------------------------------------------------------------------------------- /docs/docsets/Presentr.docset/Contents/Resources/Documents/js/jazzy.js: -------------------------------------------------------------------------------- 1 | window.jazzy = {'docset': false} 2 | if (typeof window.dash != 'undefined') { 3 | document.documentElement.className += ' dash' 4 | window.jazzy.docset = true 5 | } 6 | if (navigator.userAgent.match(/xcode/i)) { 7 | document.documentElement.className += ' xcode' 8 | window.jazzy.docset = true 9 | } 10 | 11 | // On doc load, toggle the URL hash discussion if present 12 | $(document).ready(function() { 13 | if (!window.jazzy.docset) { 14 | var linkToHash = $('a[href="' + window.location.hash +'"]'); 15 | linkToHash.trigger("click"); 16 | } 17 | }); 18 | 19 | // On token click, toggle its discussion and animate token.marginLeft 20 | $(".token").click(function(event) { 21 | if (window.jazzy.docset) { 22 | return; 23 | } 24 | var link = $(this); 25 | var animationDuration = 300; 26 | var tokenOffset = "15px"; 27 | var original = link.css('marginLeft') == tokenOffset; 28 | link.animate({'margin-left':original ? "0px" : tokenOffset}, animationDuration); 29 | $content = link.parent().parent().next(); 30 | $content.slideToggle(animationDuration); 31 | 32 | // Keeps the document from jumping to the hash. 33 | var href = $(this).attr('href'); 34 | if (history.pushState) { 35 | history.pushState({}, '', href); 36 | } else { 37 | location.hash = href; 38 | } 39 | event.preventDefault(); 40 | }); 41 | -------------------------------------------------------------------------------- /docs/docsets/Presentr.docset/Contents/Resources/Documents/undocumented.json: -------------------------------------------------------------------------------- 1 | {"warnings":[{"file":"/Users/danlozano/Development/Presentr/Presentr/TransitionType.swift","line":24,"symbol":"CoverVertical","symbol_kind":"source.lang.swift.decl.enumelement","warning":"undocumented"},{"file":"/Users/danlozano/Development/Presentr/Presentr/TransitionType.swift","line":25,"symbol":"CrossDissolve","symbol_kind":"source.lang.swift.decl.enumelement","warning":"undocumented"},{"file":"/Users/danlozano/Development/Presentr/Presentr/TransitionType.swift","line":26,"symbol":"FlipHorizontal","symbol_kind":"source.lang.swift.decl.enumelement","warning":"undocumented"},{"file":"/Users/danlozano/Development/Presentr/Presentr/TransitionType.swift","line":28,"symbol":"CoverVerticalFromTop","symbol_kind":"source.lang.swift.decl.enumelement","warning":"undocumented"},{"file":"/Users/danlozano/Development/Presentr/Presentr/TransitionType.swift","line":29,"symbol":"CoverHorizontalFromRight","symbol_kind":"source.lang.swift.decl.enumelement","warning":"undocumented"},{"file":"/Users/danlozano/Development/Presentr/Presentr/TransitionType.swift","line":30,"symbol":"CoverHorizontalFromLeft","symbol_kind":"source.lang.swift.decl.enumelement","warning":"undocumented"},{"file":"/Users/danlozano/Development/Presentr/Presentr/ModalCenterPosition.swift","line":22,"symbol":"Center","symbol_kind":"source.lang.swift.decl.enumelement","warning":"undocumented"},{"file":"/Users/danlozano/Development/Presentr/Presentr/ModalCenterPosition.swift","line":23,"symbol":"TopCenter","symbol_kind":"source.lang.swift.decl.enumelement","warning":"undocumented"},{"file":"/Users/danlozano/Development/Presentr/Presentr/ModalCenterPosition.swift","line":24,"symbol":"BottomCenter","symbol_kind":"source.lang.swift.decl.enumelement","warning":"undocumented"},{"file":"/Users/danlozano/Development/Presentr/Presentr/ModalCenterPosition.swift","line":25,"symbol":"Custom","symbol_kind":"source.lang.swift.decl.enumelement","warning":"undocumented"},{"file":"/Users/danlozano/Development/Presentr/Presentr/ModalCenterPosition.swift","line":26,"symbol":"CustomOrigin","symbol_kind":"source.lang.swift.decl.enumelement","warning":"undocumented"},{"file":"/Users/danlozano/Development/Presentr/Presentr/Presentr.swift","line":37,"symbol":"init(presentationType:)","symbol_kind":"source.lang.swift.decl.function.method.instance","warning":"undocumented"},{"file":"/Users/danlozano/Development/Presentr/Presentr/Presentr.swift","line":85,"symbol":"presentationControllerForPresentedViewController(_:presentingViewController:sourceViewController:)","symbol_kind":"source.lang.swift.decl.function.method.instance","warning":"undocumented"},{"file":"/Users/danlozano/Development/Presentr/Presentr/Presentr.swift","line":89,"symbol":"animationControllerForPresentedController(_:presentingController:sourceController:)","symbol_kind":"source.lang.swift.decl.function.method.instance","warning":"undocumented"},{"file":"/Users/danlozano/Development/Presentr/Presentr/Presentr.swift","line":93,"symbol":"animationControllerForDismissedController(_:)","symbol_kind":"source.lang.swift.decl.function.method.instance","warning":"undocumented"},{"file":"/Users/danlozano/Development/Presentr/Presentr/Presentr.swift","line":120,"symbol":"customPresentViewController(_:viewController:animated:completion:)","symbol_kind":"source.lang.swift.decl.function.method.instance","warning":"undocumented"},{"file":"/Users/danlozano/Development/Presentr/Presentr/AlertViewController.swift","line":46,"symbol":"Default","symbol_kind":"source.lang.swift.decl.enumelement","warning":"undocumented"},{"file":"/Users/danlozano/Development/Presentr/Presentr/AlertViewController.swift","line":47,"symbol":"Cancel","symbol_kind":"source.lang.swift.decl.enumelement","warning":"undocumented"},{"file":"/Users/danlozano/Development/Presentr/Presentr/AlertViewController.swift","line":48,"symbol":"Destructive","symbol_kind":"source.lang.swift.decl.enumelement","warning":"undocumented"},{"file":"/Users/danlozano/Development/Presentr/Presentr/AlertViewController.swift","line":108,"symbol":"viewDidLoad()","symbol_kind":"source.lang.swift.decl.function.method.instance","warning":"undocumented"},{"file":"/Users/danlozano/Development/Presentr/Presentr/AlertViewController.swift","line":123,"symbol":"didReceiveMemoryWarning()","symbol_kind":"source.lang.swift.decl.function.method.instance","warning":"undocumented"},{"file":"/Users/danlozano/Development/Presentr/Presentr/AlertViewController.swift","line":127,"symbol":"updateViewConstraints()","symbol_kind":"source.lang.swift.decl.function.method.instance","warning":"undocumented"},{"file":"/Users/danlozano/Development/Presentr/Presentr/ModalSize.swift","line":21,"symbol":"Default","symbol_kind":"source.lang.swift.decl.enumelement","warning":"undocumented"},{"file":"/Users/danlozano/Development/Presentr/Presentr/ModalSize.swift","line":22,"symbol":"Half","symbol_kind":"source.lang.swift.decl.enumelement","warning":"undocumented"},{"file":"/Users/danlozano/Development/Presentr/Presentr/ModalSize.swift","line":23,"symbol":"Full","symbol_kind":"source.lang.swift.decl.enumelement","warning":"undocumented"},{"file":"/Users/danlozano/Development/Presentr/Presentr/ModalSize.swift","line":24,"symbol":"Custom","symbol_kind":"source.lang.swift.decl.enumelement","warning":"undocumented"},{"file":"/Users/danlozano/Development/Presentr/Presentr/Presentr+Equatable.swift","line":12,"symbol":"==(_:_:)","symbol_kind":"source.lang.swift.decl.function.free","warning":"undocumented"},{"file":"/Users/danlozano/Development/Presentr/Presentr/Presentr+Equatable.swift","line":30,"symbol":"==(_:_:)","symbol_kind":"source.lang.swift.decl.function.free","warning":"undocumented"},{"file":"/Users/danlozano/Development/Presentr/Presentr/Presentr+Equatable.swift","line":46,"symbol":"==(_:_:)","symbol_kind":"source.lang.swift.decl.function.free","warning":"undocumented"},{"file":"/Users/danlozano/Development/Presentr/Presentr/PresentationType.swift","line":22,"symbol":"Alert","symbol_kind":"source.lang.swift.decl.enumelement","warning":"undocumented"},{"file":"/Users/danlozano/Development/Presentr/Presentr/PresentationType.swift","line":23,"symbol":"Popup","symbol_kind":"source.lang.swift.decl.enumelement","warning":"undocumented"},{"file":"/Users/danlozano/Development/Presentr/Presentr/PresentationType.swift","line":24,"symbol":"TopHalf","symbol_kind":"source.lang.swift.decl.enumelement","warning":"undocumented"},{"file":"/Users/danlozano/Development/Presentr/Presentr/PresentationType.swift","line":25,"symbol":"BottomHalf","symbol_kind":"source.lang.swift.decl.enumelement","warning":"undocumented"},{"file":"/Users/danlozano/Development/Presentr/Presentr/PresentationType.swift","line":26,"symbol":"Custom","symbol_kind":"source.lang.swift.decl.enumelement","warning":"undocumented"}],"source_directory":"/Users/danlozano/Development/Presentr"} -------------------------------------------------------------------------------- /docs/docsets/Presentr.docset/Contents/Resources/docSet.dsidx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IcaliaLabs/Presentr/bc06d3bb7e734fb8600d8a05f99a44e3af17199d/docs/docsets/Presentr.docset/Contents/Resources/docSet.dsidx -------------------------------------------------------------------------------- /docs/docsets/Presentr.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IcaliaLabs/Presentr/bc06d3bb7e734fb8600d8a05f99a44e3af17199d/docs/docsets/Presentr.tgz -------------------------------------------------------------------------------- /docs/img/carat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IcaliaLabs/Presentr/bc06d3bb7e734fb8600d8a05f99a44e3af17199d/docs/img/carat.png -------------------------------------------------------------------------------- /docs/img/dash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IcaliaLabs/Presentr/bc06d3bb7e734fb8600d8a05f99a44e3af17199d/docs/img/dash.png -------------------------------------------------------------------------------- /docs/img/gh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IcaliaLabs/Presentr/bc06d3bb7e734fb8600d8a05f99a44e3af17199d/docs/img/gh.png -------------------------------------------------------------------------------- /docs/js/jazzy.js: -------------------------------------------------------------------------------- 1 | window.jazzy = {'docset': false} 2 | if (typeof window.dash != 'undefined') { 3 | document.documentElement.className += ' dash' 4 | window.jazzy.docset = true 5 | } 6 | if (navigator.userAgent.match(/xcode/i)) { 7 | document.documentElement.className += ' xcode' 8 | window.jazzy.docset = true 9 | } 10 | 11 | // On doc load, toggle the URL hash discussion if present 12 | $(document).ready(function() { 13 | if (!window.jazzy.docset) { 14 | var linkToHash = $('a[href="' + window.location.hash +'"]'); 15 | linkToHash.trigger("click"); 16 | } 17 | }); 18 | 19 | // On token click, toggle its discussion and animate token.marginLeft 20 | $(".token").click(function(event) { 21 | if (window.jazzy.docset) { 22 | return; 23 | } 24 | var link = $(this); 25 | var animationDuration = 300; 26 | var tokenOffset = "15px"; 27 | var original = link.css('marginLeft') == tokenOffset; 28 | link.animate({'margin-left':original ? "0px" : tokenOffset}, animationDuration); 29 | $content = link.parent().parent().next(); 30 | $content.slideToggle(animationDuration); 31 | 32 | // Keeps the document from jumping to the hash. 33 | var href = $(this).attr('href'); 34 | if (history.pushState) { 35 | history.pushState({}, '', href); 36 | } else { 37 | location.hash = href; 38 | } 39 | event.preventDefault(); 40 | }); 41 | -------------------------------------------------------------------------------- /docs/undocumented.json: -------------------------------------------------------------------------------- 1 | {"warnings":[{"file":"/Users/danlozano/Development/Presentr/Presentr/TransitionType.swift","line":24,"symbol":"CoverVertical","symbol_kind":"source.lang.swift.decl.enumelement","warning":"undocumented"},{"file":"/Users/danlozano/Development/Presentr/Presentr/TransitionType.swift","line":25,"symbol":"CrossDissolve","symbol_kind":"source.lang.swift.decl.enumelement","warning":"undocumented"},{"file":"/Users/danlozano/Development/Presentr/Presentr/TransitionType.swift","line":26,"symbol":"FlipHorizontal","symbol_kind":"source.lang.swift.decl.enumelement","warning":"undocumented"},{"file":"/Users/danlozano/Development/Presentr/Presentr/TransitionType.swift","line":28,"symbol":"CoverVerticalFromTop","symbol_kind":"source.lang.swift.decl.enumelement","warning":"undocumented"},{"file":"/Users/danlozano/Development/Presentr/Presentr/TransitionType.swift","line":29,"symbol":"CoverHorizontalFromRight","symbol_kind":"source.lang.swift.decl.enumelement","warning":"undocumented"},{"file":"/Users/danlozano/Development/Presentr/Presentr/TransitionType.swift","line":30,"symbol":"CoverHorizontalFromLeft","symbol_kind":"source.lang.swift.decl.enumelement","warning":"undocumented"},{"file":"/Users/danlozano/Development/Presentr/Presentr/ModalCenterPosition.swift","line":22,"symbol":"Center","symbol_kind":"source.lang.swift.decl.enumelement","warning":"undocumented"},{"file":"/Users/danlozano/Development/Presentr/Presentr/ModalCenterPosition.swift","line":23,"symbol":"TopCenter","symbol_kind":"source.lang.swift.decl.enumelement","warning":"undocumented"},{"file":"/Users/danlozano/Development/Presentr/Presentr/ModalCenterPosition.swift","line":24,"symbol":"BottomCenter","symbol_kind":"source.lang.swift.decl.enumelement","warning":"undocumented"},{"file":"/Users/danlozano/Development/Presentr/Presentr/ModalCenterPosition.swift","line":25,"symbol":"Custom","symbol_kind":"source.lang.swift.decl.enumelement","warning":"undocumented"},{"file":"/Users/danlozano/Development/Presentr/Presentr/ModalCenterPosition.swift","line":26,"symbol":"CustomOrigin","symbol_kind":"source.lang.swift.decl.enumelement","warning":"undocumented"},{"file":"/Users/danlozano/Development/Presentr/Presentr/Presentr.swift","line":37,"symbol":"init(presentationType:)","symbol_kind":"source.lang.swift.decl.function.method.instance","warning":"undocumented"},{"file":"/Users/danlozano/Development/Presentr/Presentr/Presentr.swift","line":85,"symbol":"presentationControllerForPresentedViewController(_:presentingViewController:sourceViewController:)","symbol_kind":"source.lang.swift.decl.function.method.instance","warning":"undocumented"},{"file":"/Users/danlozano/Development/Presentr/Presentr/Presentr.swift","line":89,"symbol":"animationControllerForPresentedController(_:presentingController:sourceController:)","symbol_kind":"source.lang.swift.decl.function.method.instance","warning":"undocumented"},{"file":"/Users/danlozano/Development/Presentr/Presentr/Presentr.swift","line":93,"symbol":"animationControllerForDismissedController(_:)","symbol_kind":"source.lang.swift.decl.function.method.instance","warning":"undocumented"},{"file":"/Users/danlozano/Development/Presentr/Presentr/Presentr.swift","line":120,"symbol":"customPresentViewController(_:viewController:animated:completion:)","symbol_kind":"source.lang.swift.decl.function.method.instance","warning":"undocumented"},{"file":"/Users/danlozano/Development/Presentr/Presentr/AlertViewController.swift","line":46,"symbol":"Default","symbol_kind":"source.lang.swift.decl.enumelement","warning":"undocumented"},{"file":"/Users/danlozano/Development/Presentr/Presentr/AlertViewController.swift","line":47,"symbol":"Cancel","symbol_kind":"source.lang.swift.decl.enumelement","warning":"undocumented"},{"file":"/Users/danlozano/Development/Presentr/Presentr/AlertViewController.swift","line":48,"symbol":"Destructive","symbol_kind":"source.lang.swift.decl.enumelement","warning":"undocumented"},{"file":"/Users/danlozano/Development/Presentr/Presentr/AlertViewController.swift","line":108,"symbol":"viewDidLoad()","symbol_kind":"source.lang.swift.decl.function.method.instance","warning":"undocumented"},{"file":"/Users/danlozano/Development/Presentr/Presentr/AlertViewController.swift","line":123,"symbol":"didReceiveMemoryWarning()","symbol_kind":"source.lang.swift.decl.function.method.instance","warning":"undocumented"},{"file":"/Users/danlozano/Development/Presentr/Presentr/AlertViewController.swift","line":127,"symbol":"updateViewConstraints()","symbol_kind":"source.lang.swift.decl.function.method.instance","warning":"undocumented"},{"file":"/Users/danlozano/Development/Presentr/Presentr/ModalSize.swift","line":21,"symbol":"Default","symbol_kind":"source.lang.swift.decl.enumelement","warning":"undocumented"},{"file":"/Users/danlozano/Development/Presentr/Presentr/ModalSize.swift","line":22,"symbol":"Half","symbol_kind":"source.lang.swift.decl.enumelement","warning":"undocumented"},{"file":"/Users/danlozano/Development/Presentr/Presentr/ModalSize.swift","line":23,"symbol":"Full","symbol_kind":"source.lang.swift.decl.enumelement","warning":"undocumented"},{"file":"/Users/danlozano/Development/Presentr/Presentr/ModalSize.swift","line":24,"symbol":"Custom","symbol_kind":"source.lang.swift.decl.enumelement","warning":"undocumented"},{"file":"/Users/danlozano/Development/Presentr/Presentr/Presentr+Equatable.swift","line":12,"symbol":"==(_:_:)","symbol_kind":"source.lang.swift.decl.function.free","warning":"undocumented"},{"file":"/Users/danlozano/Development/Presentr/Presentr/Presentr+Equatable.swift","line":30,"symbol":"==(_:_:)","symbol_kind":"source.lang.swift.decl.function.free","warning":"undocumented"},{"file":"/Users/danlozano/Development/Presentr/Presentr/Presentr+Equatable.swift","line":46,"symbol":"==(_:_:)","symbol_kind":"source.lang.swift.decl.function.free","warning":"undocumented"},{"file":"/Users/danlozano/Development/Presentr/Presentr/PresentationType.swift","line":22,"symbol":"Alert","symbol_kind":"source.lang.swift.decl.enumelement","warning":"undocumented"},{"file":"/Users/danlozano/Development/Presentr/Presentr/PresentationType.swift","line":23,"symbol":"Popup","symbol_kind":"source.lang.swift.decl.enumelement","warning":"undocumented"},{"file":"/Users/danlozano/Development/Presentr/Presentr/PresentationType.swift","line":24,"symbol":"TopHalf","symbol_kind":"source.lang.swift.decl.enumelement","warning":"undocumented"},{"file":"/Users/danlozano/Development/Presentr/Presentr/PresentationType.swift","line":25,"symbol":"BottomHalf","symbol_kind":"source.lang.swift.decl.enumelement","warning":"undocumented"},{"file":"/Users/danlozano/Development/Presentr/Presentr/PresentationType.swift","line":26,"symbol":"Custom","symbol_kind":"source.lang.swift.decl.enumelement","warning":"undocumented"}],"source_directory":"/Users/danlozano/Development/Presentr"} --------------------------------------------------------------------------------