├── Images └── 1.gif ├── OverlayViewController.xcodeproj ├── project.xcworkspace │ └── contents.xcworkspacedata └── project.pbxproj ├── OverlayViewController ├── ViewController.swift ├── MessageViewController.swift ├── Assets.xcassets │ └── AppIcon.appiconset │ │ └── Contents.json ├── Info.plist ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard ├── AppDelegate.swift └── OverlayViewController.swift ├── .gitignore ├── LICENSE └── README.md /Images/1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agordeev/OverlayViewController/HEAD/Images/1.gif -------------------------------------------------------------------------------- /OverlayViewController.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /OverlayViewController/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // OverlayViewController 4 | // 5 | // Created by Andrey Gordeev on 4/17/17. 6 | // Copyright © 2017 Andrey Gordeev (andrew8712@gmail.com). All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class ViewController: UIViewController, OverlayHost { 12 | @IBAction func showOverlayButtonPressed() { 13 | showOverlay(type: MessageViewController.self, fromStoryboardWithName: "Main") 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /OverlayViewController/MessageViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // MessageViewController.swift 3 | // OverlayViewController 4 | // 5 | // Created by Andrey Gordeev on 4/17/17. 6 | // Copyright © 2017 Andrey Gordeev (andrew8712@gmail.com). All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class MessageViewController: UIViewController, OverlayViewController { 12 | let overlaySize: CGSize? = CGSize(width: UIScreen.main.bounds.width * 0.8, 13 | height: 120.0) 14 | @IBAction func closeButtonPressed() { 15 | dismissOverlay() 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /OverlayViewController/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | } 33 | ], 34 | "info" : { 35 | "version" : 1, 36 | "author" : "xcode" 37 | } 38 | } -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ## OS X files 2 | .DS_Store 3 | .DS_Store? 4 | .Trashes 5 | .Spotlight-V100 6 | *.swp 7 | 8 | ## Xcode build files 9 | DerivedData/ 10 | build/ 11 | 12 | ## Xcode private settings 13 | *.pbxuser 14 | !default.pbxuser 15 | *.mode1v3 16 | !default.mode1v3 17 | *.mode2v3 18 | !default.mode2v3 19 | *.perspectivev3 20 | !default.perspectivev3 21 | 22 | xcuserdata/ 23 | 24 | ## Other 25 | *.xccheckout 26 | *.moved-aside 27 | *.xcuserstate 28 | *.xcscmblueprint 29 | 30 | ## Obj-C/Swift specific 31 | *.hmap 32 | *.ipa 33 | *.dSYM.zip 34 | *.dSYM 35 | 36 | ## Swift Package Manager 37 | .build/ 38 | 39 | ## Carthage 40 | Carthage/Build 41 | 42 | # fastlane 43 | # https://github.com/fastlane/fastlane/blob/master/docs/Gitignore.md 44 | 45 | fastlane/report.xml 46 | fastlane/Preview.html 47 | fastlane/screenshots 48 | fastlane/test_output 49 | 50 | ## Playgrounds 51 | timeline.xctimeline 52 | playground.xcworkspace -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015-present Andrey Gordeev 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 13 | all 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 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /OverlayViewController/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 | CFBundleVersion 20 | 1 21 | LSRequiresIPhoneOS 22 | 23 | UILaunchStoryboardName 24 | LaunchScreen 25 | UIMainStoryboardFile 26 | Main 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # OverlayViewController 2 | 3 |

4 | 5 | A simple way to present your child view controller on top of another one. Read relevant article: [https://andreygordeev.com/2017/04/18/overlay-view-controller-protocols-swift/](https://andreygordeev.com/2017/04/18/overlay-view-controller-protocols-swift/). 6 | 7 | Written on Swift. 8 | 9 | ## Usage 10 | 11 | ### Parent view controller 12 | 13 | Make the parent view controller conforming to `OverlayHost` protocol and call `showOverlay(_:)` method when needed: 14 | 15 | ```swift 16 | class ViewController: UIViewController, OverlayHost { 17 | @IBAction func showOverlayButtonPressed() { 18 | showOverlay(type: MessageViewController.self, fromStoryboardWithName: "Main") 19 | } 20 | } 21 | ``` 22 | 23 | ### Overlay view controller 24 | 25 | Make the parent view controller conforming to `OverlayViewController` protocol and call `dismissOverlay()` method when you want to dismiss the overlay: 26 | 27 | ```swift 28 | class MessageViewController: UIViewController, OverlayViewController { 29 | let overlaySize: CGSize? = CGSize(width: UIScreen.main.bounds.width * 0.8, height: 120.0) 30 | @IBAction func closeButtonPressed() { 31 | dismissOverlay() 32 | } 33 | } 34 | ``` 35 | 36 | On storyboard, set view controller's Storyboard ID to `MessageViewController`. 37 | 38 | ## Installation 39 | 40 | Just drop `OverlayViewController.swift` into your project and you're all set. 41 | 42 | ## Author 43 | 44 | [Andrey Gordeev](https//andreygordeev.com) 45 | 46 | ## License 47 | 48 | This project is under MIT license. For more information, see `LICENSE` file. 49 | -------------------------------------------------------------------------------- /OverlayViewController/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 | -------------------------------------------------------------------------------- /OverlayViewController/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // OverlayViewController 4 | // 5 | // Created by Andrey Gordeev on 4/17/17. 6 | // Copyright © 2017 Andrey Gordeev (andrew8712@gmail.com). All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | @UIApplicationMain 12 | class AppDelegate: UIResponder, UIApplicationDelegate { 13 | 14 | var window: UIWindow? 15 | 16 | 17 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { 18 | // Override point for customization after application launch. 19 | return true 20 | } 21 | 22 | func applicationWillResignActive(_ application: UIApplication) { 23 | // 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. 24 | // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. 25 | } 26 | 27 | func applicationDidEnterBackground(_ application: UIApplication) { 28 | // 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. 29 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 30 | } 31 | 32 | func applicationWillEnterForeground(_ application: UIApplication) { 33 | // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. 34 | } 35 | 36 | func applicationDidBecomeActive(_ application: UIApplication) { 37 | // 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. 38 | } 39 | 40 | func applicationWillTerminate(_ application: UIApplication) { 41 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 42 | } 43 | 44 | 45 | } 46 | 47 | -------------------------------------------------------------------------------- /OverlayViewController/OverlayViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // OverlayViewController.swift 3 | // OverlayViewController 4 | // 5 | // Created by Andrey Gordeev on 4/17/17. 6 | // Copyright © 2017 Andrey Gordeev (andrew8712@gmail.com). All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | protocol OverlayHost { 12 | func showOverlay(type: T.Type, fromStoryboardWithName storyboardName: String) -> T? 13 | func showOverlay(identifier: String, fromStoryboardWithName storyboardName: String) -> T? 14 | } 15 | 16 | extension OverlayHost where Self: UIViewController { 17 | @discardableResult 18 | func showOverlay(type: T.Type, fromStoryboardWithName storyboardName: String) -> T? { 19 | let identifier = String(describing: T.self) 20 | return showOverlay(identifier: identifier, fromStoryboardWithName: storyboardName) 21 | } 22 | 23 | @discardableResult 24 | func showOverlay(identifier: String, fromStoryboardWithName storyboardName: String) -> T? { 25 | let storyboard = UIStoryboard(name: storyboardName, bundle: nil) 26 | guard let overlay = storyboard.instantiateViewController(withIdentifier: identifier) as? T else { return nil } 27 | overlay.presentOverlay(from: self) 28 | return overlay 29 | } 30 | } 31 | 32 | protocol OverlayViewController: class { 33 | var overlaySize: CGSize? { get } 34 | func presentOverlay(from parentViewController: UIViewController) 35 | func dismissOverlay() 36 | } 37 | 38 | extension OverlayViewController where Self: UIViewController { 39 | var overlaySize: CGSize? { 40 | return nil 41 | } 42 | /// Just a random number. We use this to access blackOverlayView later after we've added it. 43 | private var blackOverlayViewTag: Int { 44 | return 392895 45 | } 46 | 47 | /// Presents the current view controller as an overlay on a given parent view controller. 48 | /// 49 | /// - Parameter parentViewController: The parent view controller. 50 | func presentOverlay(from parentViewController: UIViewController) { 51 | // Dim out background. 52 | let parentBounds = parentViewController.view.bounds 53 | let blackOverlayView = UIView() 54 | blackOverlayView.backgroundColor = UIColor.black.withAlphaComponent(0.2) 55 | blackOverlayView.frame = parentBounds 56 | blackOverlayView.alpha = 0.0 57 | blackOverlayView.isUserInteractionEnabled = true 58 | blackOverlayView.tag = blackOverlayViewTag 59 | parentViewController.view.addSubview(blackOverlayView) 60 | 61 | let containerView = UIView() 62 | if let overlaySize = overlaySize { 63 | // The user has provided the overlaySize. 64 | let x = (parentBounds.width - overlaySize.width) * 0.5 65 | let y = (parentBounds.height - overlaySize.height) * 0.5 66 | containerView.frame = CGRect(x: x, y: y, width: overlaySize.width, height: overlaySize.height) 67 | } else { 68 | // No overlaySize provided. By default we have small paddings at every edge. 69 | containerView.frame = parentBounds.insetBy(dx: parentBounds.width*0.05, 70 | dy: parentBounds.height*0.05) 71 | } 72 | 73 | // Adding a shadow. 74 | containerView.layer.shadowColor = UIColor.black.cgColor 75 | containerView.layer.shadowRadius = 10.0 76 | containerView.layer.shadowOpacity = 0.4 77 | containerView.layer.shadowOffset = CGSize.zero 78 | 79 | parentViewController.view.addSubview(containerView) 80 | 81 | // Round corners. 82 | view.layer.cornerRadius = 8.0 83 | view.clipsToBounds = false 84 | 85 | // Adding to the parent view controller. 86 | parentViewController.addChildViewController(self) 87 | containerView.addSubview(self.view) 88 | // Fit into the container view. 89 | constraintViewEqual(view1: containerView, view2: self.view) 90 | self.didMove(toParentViewController: parentViewController) 91 | 92 | // Fade the overlay view in. 93 | containerView.alpha = 0.0 94 | containerView.transform = CGAffineTransform(scaleX: 0.85, y: 0.85) 95 | UIView.animate(withDuration: 0.3) { 96 | containerView.alpha = 1.0 97 | containerView.transform = .identity 98 | blackOverlayView.alpha = 1.0 99 | } 100 | } 101 | 102 | /// Removes the current view controller from the parent view controller with animation. 103 | func dismissOverlay() { 104 | guard let containerView = view.superview else { return } 105 | let blackOverlayView = containerView.superview?.viewWithTag(blackOverlayViewTag) 106 | UIView.animate(withDuration: 0.3, animations: { 107 | blackOverlayView?.alpha = 0.0 108 | containerView.alpha = 0.0 109 | containerView.transform = CGAffineTransform(scaleX: 0.85, y: 0.85) 110 | }) { _ in 111 | self.removeFromParentViewController() 112 | containerView.removeFromSuperview() 113 | blackOverlayView?.removeFromSuperview() 114 | } 115 | } 116 | 117 | /// Sticks child view (view1) to the parent view (view2) using constraints. 118 | private func constraintViewEqual(view1: UIView, view2: UIView) { 119 | view2.translatesAutoresizingMaskIntoConstraints = false 120 | let constraint1 = NSLayoutConstraint(item: view1, attribute: .top, relatedBy: .equal, toItem: view2, attribute: .top, multiplier: 1.0, constant: 0.0) 121 | let constraint2 = NSLayoutConstraint(item: view1, attribute: .trailing, relatedBy: .equal, toItem: view2, attribute: .trailing, multiplier: 1.0, constant: 0.0) 122 | let constraint3 = NSLayoutConstraint(item: view1, attribute: .bottom, relatedBy: .equal, toItem: view2, attribute: .bottom, multiplier: 1.0, constant: 0.0) 123 | let constraint4 = NSLayoutConstraint(item: view1, attribute: .leading, relatedBy: .equal, toItem: view2, attribute: .leading, multiplier: 1.0, constant: 0.0) 124 | view1.addConstraints([constraint1, constraint2, constraint3, constraint4]) 125 | } 126 | } 127 | -------------------------------------------------------------------------------- /OverlayViewController/Base.lproj/Main.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 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 60 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | -------------------------------------------------------------------------------- /OverlayViewController.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 96691D671EA50D5D00DE7E6C /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 96691D661EA50D5D00DE7E6C /* AppDelegate.swift */; }; 11 | 96691D691EA50D5D00DE7E6C /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 96691D681EA50D5D00DE7E6C /* ViewController.swift */; }; 12 | 96691D6C1EA50D5D00DE7E6C /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 96691D6A1EA50D5D00DE7E6C /* Main.storyboard */; }; 13 | 96691D6E1EA50D5D00DE7E6C /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 96691D6D1EA50D5D00DE7E6C /* Assets.xcassets */; }; 14 | 96691D711EA50D5D00DE7E6C /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 96691D6F1EA50D5D00DE7E6C /* LaunchScreen.storyboard */; }; 15 | 96691D791EA50DC500DE7E6C /* OverlayViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 96691D781EA50DC500DE7E6C /* OverlayViewController.swift */; }; 16 | 96691D7B1EA50F3900DE7E6C /* MessageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 96691D7A1EA50F3900DE7E6C /* MessageViewController.swift */; }; 17 | /* End PBXBuildFile section */ 18 | 19 | /* Begin PBXFileReference section */ 20 | 96691D631EA50D5D00DE7E6C /* OverlayViewController.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = OverlayViewController.app; sourceTree = BUILT_PRODUCTS_DIR; }; 21 | 96691D661EA50D5D00DE7E6C /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 22 | 96691D681EA50D5D00DE7E6C /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; 23 | 96691D6B1EA50D5D00DE7E6C /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 24 | 96691D6D1EA50D5D00DE7E6C /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 25 | 96691D701EA50D5D00DE7E6C /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 26 | 96691D721EA50D5D00DE7E6C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 27 | 96691D781EA50DC500DE7E6C /* OverlayViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = OverlayViewController.swift; sourceTree = ""; }; 28 | 96691D7A1EA50F3900DE7E6C /* MessageViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MessageViewController.swift; sourceTree = ""; }; 29 | /* End PBXFileReference section */ 30 | 31 | /* Begin PBXFrameworksBuildPhase section */ 32 | 96691D601EA50D5D00DE7E6C /* Frameworks */ = { 33 | isa = PBXFrameworksBuildPhase; 34 | buildActionMask = 2147483647; 35 | files = ( 36 | ); 37 | runOnlyForDeploymentPostprocessing = 0; 38 | }; 39 | /* End PBXFrameworksBuildPhase section */ 40 | 41 | /* Begin PBXGroup section */ 42 | 96691D5A1EA50D5D00DE7E6C = { 43 | isa = PBXGroup; 44 | children = ( 45 | 96691D651EA50D5D00DE7E6C /* OverlayViewController */, 46 | 96691D641EA50D5D00DE7E6C /* Products */, 47 | ); 48 | sourceTree = ""; 49 | }; 50 | 96691D641EA50D5D00DE7E6C /* Products */ = { 51 | isa = PBXGroup; 52 | children = ( 53 | 96691D631EA50D5D00DE7E6C /* OverlayViewController.app */, 54 | ); 55 | name = Products; 56 | sourceTree = ""; 57 | }; 58 | 96691D651EA50D5D00DE7E6C /* OverlayViewController */ = { 59 | isa = PBXGroup; 60 | children = ( 61 | 96691D661EA50D5D00DE7E6C /* AppDelegate.swift */, 62 | 96691D681EA50D5D00DE7E6C /* ViewController.swift */, 63 | 96691D6A1EA50D5D00DE7E6C /* Main.storyboard */, 64 | 96691D6D1EA50D5D00DE7E6C /* Assets.xcassets */, 65 | 96691D6F1EA50D5D00DE7E6C /* LaunchScreen.storyboard */, 66 | 96691D721EA50D5D00DE7E6C /* Info.plist */, 67 | 96691D781EA50DC500DE7E6C /* OverlayViewController.swift */, 68 | 96691D7A1EA50F3900DE7E6C /* MessageViewController.swift */, 69 | ); 70 | path = OverlayViewController; 71 | sourceTree = ""; 72 | }; 73 | /* End PBXGroup section */ 74 | 75 | /* Begin PBXNativeTarget section */ 76 | 96691D621EA50D5D00DE7E6C /* OverlayViewController */ = { 77 | isa = PBXNativeTarget; 78 | buildConfigurationList = 96691D751EA50D5D00DE7E6C /* Build configuration list for PBXNativeTarget "OverlayViewController" */; 79 | buildPhases = ( 80 | 96691D5F1EA50D5D00DE7E6C /* Sources */, 81 | 96691D601EA50D5D00DE7E6C /* Frameworks */, 82 | 96691D611EA50D5D00DE7E6C /* Resources */, 83 | ); 84 | buildRules = ( 85 | ); 86 | dependencies = ( 87 | ); 88 | name = OverlayViewController; 89 | productName = OverlayViewController; 90 | productReference = 96691D631EA50D5D00DE7E6C /* OverlayViewController.app */; 91 | productType = "com.apple.product-type.application"; 92 | }; 93 | /* End PBXNativeTarget section */ 94 | 95 | /* Begin PBXProject section */ 96 | 96691D5B1EA50D5D00DE7E6C /* Project object */ = { 97 | isa = PBXProject; 98 | attributes = { 99 | LastSwiftUpdateCheck = 0830; 100 | LastUpgradeCheck = 0830; 101 | ORGANIZATIONNAME = "Andrey Gordeev (andrew8712@gmail.com)"; 102 | TargetAttributes = { 103 | 96691D621EA50D5D00DE7E6C = { 104 | CreatedOnToolsVersion = 8.3.1; 105 | ProvisioningStyle = Automatic; 106 | }; 107 | }; 108 | }; 109 | buildConfigurationList = 96691D5E1EA50D5D00DE7E6C /* Build configuration list for PBXProject "OverlayViewController" */; 110 | compatibilityVersion = "Xcode 3.2"; 111 | developmentRegion = English; 112 | hasScannedForEncodings = 0; 113 | knownRegions = ( 114 | en, 115 | Base, 116 | ); 117 | mainGroup = 96691D5A1EA50D5D00DE7E6C; 118 | productRefGroup = 96691D641EA50D5D00DE7E6C /* Products */; 119 | projectDirPath = ""; 120 | projectRoot = ""; 121 | targets = ( 122 | 96691D621EA50D5D00DE7E6C /* OverlayViewController */, 123 | ); 124 | }; 125 | /* End PBXProject section */ 126 | 127 | /* Begin PBXResourcesBuildPhase section */ 128 | 96691D611EA50D5D00DE7E6C /* Resources */ = { 129 | isa = PBXResourcesBuildPhase; 130 | buildActionMask = 2147483647; 131 | files = ( 132 | 96691D711EA50D5D00DE7E6C /* LaunchScreen.storyboard in Resources */, 133 | 96691D6E1EA50D5D00DE7E6C /* Assets.xcassets in Resources */, 134 | 96691D6C1EA50D5D00DE7E6C /* Main.storyboard in Resources */, 135 | ); 136 | runOnlyForDeploymentPostprocessing = 0; 137 | }; 138 | /* End PBXResourcesBuildPhase section */ 139 | 140 | /* Begin PBXSourcesBuildPhase section */ 141 | 96691D5F1EA50D5D00DE7E6C /* Sources */ = { 142 | isa = PBXSourcesBuildPhase; 143 | buildActionMask = 2147483647; 144 | files = ( 145 | 96691D791EA50DC500DE7E6C /* OverlayViewController.swift in Sources */, 146 | 96691D691EA50D5D00DE7E6C /* ViewController.swift in Sources */, 147 | 96691D7B1EA50F3900DE7E6C /* MessageViewController.swift in Sources */, 148 | 96691D671EA50D5D00DE7E6C /* AppDelegate.swift in Sources */, 149 | ); 150 | runOnlyForDeploymentPostprocessing = 0; 151 | }; 152 | /* End PBXSourcesBuildPhase section */ 153 | 154 | /* Begin PBXVariantGroup section */ 155 | 96691D6A1EA50D5D00DE7E6C /* Main.storyboard */ = { 156 | isa = PBXVariantGroup; 157 | children = ( 158 | 96691D6B1EA50D5D00DE7E6C /* Base */, 159 | ); 160 | name = Main.storyboard; 161 | sourceTree = ""; 162 | }; 163 | 96691D6F1EA50D5D00DE7E6C /* LaunchScreen.storyboard */ = { 164 | isa = PBXVariantGroup; 165 | children = ( 166 | 96691D701EA50D5D00DE7E6C /* Base */, 167 | ); 168 | name = LaunchScreen.storyboard; 169 | sourceTree = ""; 170 | }; 171 | /* End PBXVariantGroup section */ 172 | 173 | /* Begin XCBuildConfiguration section */ 174 | 96691D731EA50D5D00DE7E6C /* Debug */ = { 175 | isa = XCBuildConfiguration; 176 | buildSettings = { 177 | ALWAYS_SEARCH_USER_PATHS = NO; 178 | CLANG_ANALYZER_NONNULL = YES; 179 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 180 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 181 | CLANG_CXX_LIBRARY = "libc++"; 182 | CLANG_ENABLE_MODULES = YES; 183 | CLANG_ENABLE_OBJC_ARC = YES; 184 | CLANG_WARN_BOOL_CONVERSION = YES; 185 | CLANG_WARN_CONSTANT_CONVERSION = YES; 186 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 187 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 188 | CLANG_WARN_EMPTY_BODY = YES; 189 | CLANG_WARN_ENUM_CONVERSION = YES; 190 | CLANG_WARN_INFINITE_RECURSION = YES; 191 | CLANG_WARN_INT_CONVERSION = YES; 192 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 193 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 194 | CLANG_WARN_UNREACHABLE_CODE = YES; 195 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 196 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 197 | COPY_PHASE_STRIP = NO; 198 | DEBUG_INFORMATION_FORMAT = dwarf; 199 | ENABLE_STRICT_OBJC_MSGSEND = YES; 200 | ENABLE_TESTABILITY = YES; 201 | GCC_C_LANGUAGE_STANDARD = gnu99; 202 | GCC_DYNAMIC_NO_PIC = NO; 203 | GCC_NO_COMMON_BLOCKS = YES; 204 | GCC_OPTIMIZATION_LEVEL = 0; 205 | GCC_PREPROCESSOR_DEFINITIONS = ( 206 | "DEBUG=1", 207 | "$(inherited)", 208 | ); 209 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 210 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 211 | GCC_WARN_UNDECLARED_SELECTOR = YES; 212 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 213 | GCC_WARN_UNUSED_FUNCTION = YES; 214 | GCC_WARN_UNUSED_VARIABLE = YES; 215 | IPHONEOS_DEPLOYMENT_TARGET = 10.3; 216 | MTL_ENABLE_DEBUG_INFO = YES; 217 | ONLY_ACTIVE_ARCH = YES; 218 | SDKROOT = iphoneos; 219 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 220 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 221 | }; 222 | name = Debug; 223 | }; 224 | 96691D741EA50D5D00DE7E6C /* Release */ = { 225 | isa = XCBuildConfiguration; 226 | buildSettings = { 227 | ALWAYS_SEARCH_USER_PATHS = NO; 228 | CLANG_ANALYZER_NONNULL = YES; 229 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 230 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 231 | CLANG_CXX_LIBRARY = "libc++"; 232 | CLANG_ENABLE_MODULES = YES; 233 | CLANG_ENABLE_OBJC_ARC = YES; 234 | CLANG_WARN_BOOL_CONVERSION = YES; 235 | CLANG_WARN_CONSTANT_CONVERSION = YES; 236 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 237 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 238 | CLANG_WARN_EMPTY_BODY = YES; 239 | CLANG_WARN_ENUM_CONVERSION = YES; 240 | CLANG_WARN_INFINITE_RECURSION = YES; 241 | CLANG_WARN_INT_CONVERSION = YES; 242 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 243 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 244 | CLANG_WARN_UNREACHABLE_CODE = YES; 245 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 246 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 247 | COPY_PHASE_STRIP = NO; 248 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 249 | ENABLE_NS_ASSERTIONS = NO; 250 | ENABLE_STRICT_OBJC_MSGSEND = YES; 251 | GCC_C_LANGUAGE_STANDARD = gnu99; 252 | GCC_NO_COMMON_BLOCKS = YES; 253 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 254 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 255 | GCC_WARN_UNDECLARED_SELECTOR = YES; 256 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 257 | GCC_WARN_UNUSED_FUNCTION = YES; 258 | GCC_WARN_UNUSED_VARIABLE = YES; 259 | IPHONEOS_DEPLOYMENT_TARGET = 10.3; 260 | MTL_ENABLE_DEBUG_INFO = NO; 261 | SDKROOT = iphoneos; 262 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 263 | VALIDATE_PRODUCT = YES; 264 | }; 265 | name = Release; 266 | }; 267 | 96691D761EA50D5D00DE7E6C /* Debug */ = { 268 | isa = XCBuildConfiguration; 269 | buildSettings = { 270 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 271 | INFOPLIST_FILE = OverlayViewController/Info.plist; 272 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 273 | PRODUCT_BUNDLE_IDENTIFIER = com.andreygordeev.OverlayViewController; 274 | PRODUCT_NAME = "$(TARGET_NAME)"; 275 | SWIFT_VERSION = 3.0; 276 | }; 277 | name = Debug; 278 | }; 279 | 96691D771EA50D5D00DE7E6C /* Release */ = { 280 | isa = XCBuildConfiguration; 281 | buildSettings = { 282 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 283 | INFOPLIST_FILE = OverlayViewController/Info.plist; 284 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 285 | PRODUCT_BUNDLE_IDENTIFIER = com.andreygordeev.OverlayViewController; 286 | PRODUCT_NAME = "$(TARGET_NAME)"; 287 | SWIFT_VERSION = 3.0; 288 | }; 289 | name = Release; 290 | }; 291 | /* End XCBuildConfiguration section */ 292 | 293 | /* Begin XCConfigurationList section */ 294 | 96691D5E1EA50D5D00DE7E6C /* Build configuration list for PBXProject "OverlayViewController" */ = { 295 | isa = XCConfigurationList; 296 | buildConfigurations = ( 297 | 96691D731EA50D5D00DE7E6C /* Debug */, 298 | 96691D741EA50D5D00DE7E6C /* Release */, 299 | ); 300 | defaultConfigurationIsVisible = 0; 301 | defaultConfigurationName = Release; 302 | }; 303 | 96691D751EA50D5D00DE7E6C /* Build configuration list for PBXNativeTarget "OverlayViewController" */ = { 304 | isa = XCConfigurationList; 305 | buildConfigurations = ( 306 | 96691D761EA50D5D00DE7E6C /* Debug */, 307 | 96691D771EA50D5D00DE7E6C /* Release */, 308 | ); 309 | defaultConfigurationIsVisible = 0; 310 | }; 311 | /* End XCConfigurationList section */ 312 | }; 313 | rootObject = 96691D5B1EA50D5D00DE7E6C /* Project object */; 314 | } 315 | --------------------------------------------------------------------------------