├── NGPopoverForceResizeTest ├── Assets.xcassets │ ├── Contents.json │ └── AppIcon.appiconset │ │ └── Contents.json ├── Info.plist ├── Base.lproj │ └── LaunchScreen.storyboard ├── AppDelegate.swift └── ViewController.swift ├── README.md ├── NGPopoverForceResizeTest.xcodeproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist ├── xcuserdata │ └── ngilmore.xcuserdatad │ │ └── xcschemes │ │ └── xcschememanagement.plist └── project.pbxproj ├── LICENSE └── .gitignore /NGPopoverForceResizeTest/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # NGPopoverForceResizeTest 2 | 3 | This repo contains the example code for the blog post hosted here: https://noahgilmore.com/blog/popover-uinavigationcontroller-preferredcontentsize/ 4 | -------------------------------------------------------------------------------- /NGPopoverForceResizeTest.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /NGPopoverForceResizeTest.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /NGPopoverForceResizeTest.xcodeproj/xcuserdata/ngilmore.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | NGPopoverForceResizeTest.xcscheme_^#shared#^_ 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 Noah Gilmore 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 | -------------------------------------------------------------------------------- /NGPopoverForceResizeTest/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 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 | UIRequiredDeviceCapabilities 26 | 27 | armv7 28 | 29 | UISupportedInterfaceOrientations 30 | 31 | UIInterfaceOrientationPortrait 32 | UIInterfaceOrientationLandscapeLeft 33 | UIInterfaceOrientationLandscapeRight 34 | 35 | UISupportedInterfaceOrientations~ipad 36 | 37 | UIInterfaceOrientationPortrait 38 | UIInterfaceOrientationPortraitUpsideDown 39 | UIInterfaceOrientationLandscapeLeft 40 | UIInterfaceOrientationLandscapeRight 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | # 3 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore 4 | 5 | ## Build generated 6 | build/ 7 | DerivedData/ 8 | 9 | ## Various settings 10 | *.pbxuser 11 | !default.pbxuser 12 | *.mode1v3 13 | !default.mode1v3 14 | *.mode2v3 15 | !default.mode2v3 16 | *.perspectivev3 17 | !default.perspectivev3 18 | xcuserdata/ 19 | 20 | ## Other 21 | *.moved-aside 22 | *.xccheckout 23 | *.xcscmblueprint 24 | 25 | ## Obj-C/Swift specific 26 | *.hmap 27 | *.ipa 28 | *.dSYM.zip 29 | *.dSYM 30 | 31 | ## Playgrounds 32 | timeline.xctimeline 33 | playground.xcworkspace 34 | 35 | # Swift Package Manager 36 | # 37 | # Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. 38 | # Packages/ 39 | # Package.pins 40 | # Package.resolved 41 | .build/ 42 | 43 | # CocoaPods 44 | # 45 | # We recommend against adding the Pods directory to your .gitignore. However 46 | # you should judge for yourself, the pros and cons are mentioned at: 47 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control 48 | # 49 | # Pods/ 50 | 51 | # Carthage 52 | # 53 | # Add this line if you want to avoid checking in source code from Carthage dependencies. 54 | # Carthage/Checkouts 55 | 56 | Carthage/Build 57 | 58 | # fastlane 59 | # 60 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the 61 | # screenshots whenever they are needed. 62 | # For more information about the recommended setup visit: 63 | # https://docs.fastlane.tools/best-practices/source-control/#source-control 64 | 65 | fastlane/report.xml 66 | fastlane/Preview.html 67 | fastlane/screenshots/**/*.png 68 | fastlane/test_output 69 | -------------------------------------------------------------------------------- /NGPopoverForceResizeTest/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 | -------------------------------------------------------------------------------- /NGPopoverForceResizeTest/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" : "ipad", 45 | "size" : "20x20", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "20x20", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "29x29", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "29x29", 61 | "scale" : "2x" 62 | }, 63 | { 64 | "idiom" : "ipad", 65 | "size" : "40x40", 66 | "scale" : "1x" 67 | }, 68 | { 69 | "idiom" : "ipad", 70 | "size" : "40x40", 71 | "scale" : "2x" 72 | }, 73 | { 74 | "idiom" : "ipad", 75 | "size" : "76x76", 76 | "scale" : "1x" 77 | }, 78 | { 79 | "idiom" : "ipad", 80 | "size" : "76x76", 81 | "scale" : "2x" 82 | }, 83 | { 84 | "idiom" : "ipad", 85 | "size" : "83.5x83.5", 86 | "scale" : "2x" 87 | }, 88 | { 89 | "idiom" : "ios-marketing", 90 | "size" : "1024x1024", 91 | "scale" : "1x" 92 | } 93 | ], 94 | "info" : { 95 | "version" : 1, 96 | "author" : "xcode" 97 | } 98 | } -------------------------------------------------------------------------------- /NGPopoverForceResizeTest/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // NGPopoverForceResizeTest 4 | // 5 | // Created by Noah Gilmore on 8/15/19. 6 | // Copyright © 2019 Noah Gilmore. 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: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { 18 | // Override point for customization after application launch. 19 | window = UIWindow(frame: UIScreen.main.bounds) 20 | window?.rootViewController = ViewController() 21 | window?.makeKeyAndVisible() 22 | return true 23 | } 24 | 25 | func applicationWillResignActive(_ application: UIApplication) { 26 | // 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. 27 | // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. 28 | } 29 | 30 | func applicationDidEnterBackground(_ application: UIApplication) { 31 | // 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. 32 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 33 | } 34 | 35 | func applicationWillEnterForeground(_ application: UIApplication) { 36 | // 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. 37 | } 38 | 39 | func applicationDidBecomeActive(_ application: UIApplication) { 40 | // 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. 41 | } 42 | 43 | func applicationWillTerminate(_ application: UIApplication) { 44 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 45 | } 46 | 47 | 48 | } 49 | 50 | -------------------------------------------------------------------------------- /NGPopoverForceResizeTest/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // NGPopoverForceResizeTest 4 | // 5 | // Created by Noah Gilmore on 8/15/19. 6 | // Copyright © 2019 Noah Gilmore. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class LargeViewControllerWithNavBar: UIViewController { 12 | private let stackView: UIStackView = { 13 | let view = UIStackView() 14 | view.axis = .vertical 15 | view.spacing = 10 16 | return view 17 | }() 18 | var heightConstraint: NSLayoutConstraint! = nil 19 | var isExpanded: Bool = false { 20 | didSet { 21 | if self.isExpanded { 22 | self.heightConstraint.constant = 600 23 | } else { 24 | self.heightConstraint.constant = 400 25 | } 26 | self.setPreferredContentSizeFromAutolayout() 27 | } 28 | } 29 | 30 | override func viewDidLoad() { 31 | self.view.backgroundColor = .green 32 | self.title = "This is a title" 33 | 34 | let label = UILabel() 35 | label.text = "This controller starts at 600x400" 36 | 37 | let button = UIButton() 38 | button.setTitle("Tap to expand/contract", for: .normal) 39 | button.setTitleColor(.blue, for: .normal) 40 | button.addTarget(self, action: #selector(didTap), for: .touchUpInside) 41 | 42 | stackView.addArrangedSubview(label) 43 | stackView.addArrangedSubview(button) 44 | 45 | stackView.translatesAutoresizingMaskIntoConstraints = false 46 | self.view.addSubview(stackView) 47 | stackView.centerXAnchor.constraint(equalTo: self.view.centerXAnchor).isActive = true 48 | stackView.centerYAnchor.constraint(equalTo: self.view.centerYAnchor).isActive = true 49 | 50 | let widthConstraint = self.view.widthAnchor.constraint(equalToConstant: 600) 51 | widthConstraint.priority = .defaultHigh 52 | widthConstraint.isActive = true 53 | heightConstraint = self.view.heightAnchor.constraint(equalToConstant: 400) 54 | heightConstraint.priority = .defaultHigh 55 | heightConstraint.isActive = true 56 | } 57 | 58 | func setPreferredContentSizeFromAutolayout() { 59 | let contentSize = self.view.systemLayoutSizeFitting( 60 | UIView.layoutFittingCompressedSize 61 | ) 62 | self.preferredContentSize = contentSize 63 | self.popoverPresentationController? 64 | .presentedViewController 65 | .preferredContentSize = contentSize 66 | } 67 | 68 | override func viewWillAppear(_ animated: Bool) { 69 | super.viewWillAppear(animated) 70 | 71 | self.navigationController?.setNavigationBarHidden(false, animated: true) 72 | self.setPreferredContentSizeFromAutolayout() 73 | } 74 | 75 | @objc private func didTap() { 76 | self.isExpanded = !self.isExpanded 77 | } 78 | } 79 | 80 | 81 | class SmallViewControllerNoNavBar: UIViewController { 82 | private let stackView: UIStackView = { 83 | let view = UIStackView() 84 | view.axis = .vertical 85 | view.spacing = 10 86 | return view 87 | }() 88 | 89 | override func viewDidLoad() { 90 | self.view.backgroundColor = .red 91 | 92 | let label = UILabel() 93 | label.text = "This controller is 300x300" 94 | 95 | let button = UIButton() 96 | button.setTitle("Push another controller", for: .normal) 97 | button.setTitleColor(.blue, for: .normal) 98 | button.addTarget(self, action: #selector(didTap), for: .touchUpInside) 99 | 100 | stackView.addArrangedSubview(label) 101 | stackView.addArrangedSubview(button) 102 | 103 | stackView.translatesAutoresizingMaskIntoConstraints = false 104 | self.view.addSubview(stackView) 105 | stackView.centerXAnchor.constraint(equalTo: self.view.centerXAnchor).isActive = true 106 | stackView.centerYAnchor.constraint(equalTo: self.view.centerYAnchor).isActive = true 107 | 108 | let widthConstraint = self.view.widthAnchor.constraint(equalToConstant: 300) 109 | widthConstraint.priority = .defaultHigh 110 | widthConstraint.isActive = true 111 | let heightConstraint = self.view.heightAnchor.constraint(equalToConstant: 300) 112 | heightConstraint.priority = .defaultHigh 113 | heightConstraint.isActive = true 114 | } 115 | 116 | override func viewWillAppear(_ animated: Bool) { 117 | super.viewWillAppear(animated) 118 | 119 | self.navigationController?.setToolbarHidden(true, animated: false) 120 | self.navigationController?.setNavigationBarHidden(true, animated: false) 121 | self.setPreferredContentSizeFromAutolayout() 122 | } 123 | 124 | @objc private func didTap() { 125 | self.navigationController?.pushViewController(LargeViewControllerWithNavBar(), animated: true) 126 | } 127 | 128 | func setPreferredContentSizeFromAutolayout() { 129 | let contentSize = self.view.systemLayoutSizeFitting( 130 | UIView.layoutFittingCompressedSize 131 | ) 132 | self.preferredContentSize = contentSize 133 | self.popoverPresentationController? 134 | .presentedViewController 135 | .preferredContentSize = contentSize 136 | } 137 | } 138 | 139 | final class PopoverPushController: UIViewController { 140 | private let wrappedNavigationController: UINavigationController 141 | 142 | init(rootViewController: UIViewController) { 143 | self.wrappedNavigationController = UINavigationController(rootViewController: rootViewController) 144 | super.init(nibName: nil, bundle: nil) 145 | } 146 | 147 | required init?(coder aDecoder: NSCoder) { 148 | fatalError("init(coder:) has not been implemented") 149 | } 150 | 151 | override func viewDidLoad() { 152 | super.viewDidLoad() 153 | wrappedNavigationController.willMove(toParent: self) 154 | self.addChild(wrappedNavigationController) 155 | self.view.addSubview(wrappedNavigationController.view) 156 | } 157 | } 158 | 159 | class ViewController: UIViewController { 160 | var button: UIButton! = nil 161 | 162 | override func viewDidLoad() { 163 | super.viewDidLoad() 164 | 165 | button = UIButton() 166 | button.setTitle("Show popover", for: .normal) 167 | button.setTitleColor(.blue, for: .normal) 168 | 169 | self.view.addSubview(button) 170 | button.translatesAutoresizingMaskIntoConstraints = false 171 | button.centerXAnchor.constraint(equalTo: self.view.centerXAnchor).isActive = true 172 | button.centerYAnchor.constraint(equalTo: self.view.centerYAnchor).isActive = true 173 | button.addTarget(self, action: #selector(didTap), for: .touchUpInside) 174 | 175 | self.view.backgroundColor = .white 176 | } 177 | 178 | @objc private func didTap() { 179 | let firstVC = SmallViewControllerNoNavBar() 180 | let containerController = PopoverPushController(rootViewController: firstVC) 181 | containerController.modalPresentationStyle = .popover 182 | containerController.popoverPresentationController?.sourceRect = button.frame 183 | containerController.popoverPresentationController?.sourceView = self.view 184 | containerController.popoverPresentationController?.permittedArrowDirections = .up 185 | self.present(containerController, animated: true) 186 | } 187 | } 188 | 189 | -------------------------------------------------------------------------------- /NGPopoverForceResizeTest.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 50; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | D0C9F30F2306046B00539842 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0C9F30E2306046B00539842 /* AppDelegate.swift */; }; 11 | D0C9F3112306046B00539842 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0C9F3102306046B00539842 /* ViewController.swift */; }; 12 | D0C9F3162306046E00539842 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = D0C9F3152306046E00539842 /* Assets.xcassets */; }; 13 | D0C9F3192306046E00539842 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = D0C9F3172306046E00539842 /* LaunchScreen.storyboard */; }; 14 | /* End PBXBuildFile section */ 15 | 16 | /* Begin PBXFileReference section */ 17 | D0C9F30B2306046B00539842 /* NGPopoverForceResizeTest.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = NGPopoverForceResizeTest.app; sourceTree = BUILT_PRODUCTS_DIR; }; 18 | D0C9F30E2306046B00539842 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 19 | D0C9F3102306046B00539842 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; 20 | D0C9F3152306046E00539842 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 21 | D0C9F3182306046E00539842 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 22 | D0C9F31A2306046E00539842 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 23 | /* End PBXFileReference section */ 24 | 25 | /* Begin PBXFrameworksBuildPhase section */ 26 | D0C9F3082306046B00539842 /* Frameworks */ = { 27 | isa = PBXFrameworksBuildPhase; 28 | buildActionMask = 2147483647; 29 | files = ( 30 | ); 31 | runOnlyForDeploymentPostprocessing = 0; 32 | }; 33 | /* End PBXFrameworksBuildPhase section */ 34 | 35 | /* Begin PBXGroup section */ 36 | D0C9F3022306046B00539842 = { 37 | isa = PBXGroup; 38 | children = ( 39 | D0C9F30D2306046B00539842 /* NGPopoverForceResizeTest */, 40 | D0C9F30C2306046B00539842 /* Products */, 41 | ); 42 | sourceTree = ""; 43 | }; 44 | D0C9F30C2306046B00539842 /* Products */ = { 45 | isa = PBXGroup; 46 | children = ( 47 | D0C9F30B2306046B00539842 /* NGPopoverForceResizeTest.app */, 48 | ); 49 | name = Products; 50 | sourceTree = ""; 51 | }; 52 | D0C9F30D2306046B00539842 /* NGPopoverForceResizeTest */ = { 53 | isa = PBXGroup; 54 | children = ( 55 | D0C9F30E2306046B00539842 /* AppDelegate.swift */, 56 | D0C9F3102306046B00539842 /* ViewController.swift */, 57 | D0C9F3152306046E00539842 /* Assets.xcassets */, 58 | D0C9F3172306046E00539842 /* LaunchScreen.storyboard */, 59 | D0C9F31A2306046E00539842 /* Info.plist */, 60 | ); 61 | path = NGPopoverForceResizeTest; 62 | sourceTree = ""; 63 | }; 64 | /* End PBXGroup section */ 65 | 66 | /* Begin PBXNativeTarget section */ 67 | D0C9F30A2306046B00539842 /* NGPopoverForceResizeTest */ = { 68 | isa = PBXNativeTarget; 69 | buildConfigurationList = D0C9F31D2306046E00539842 /* Build configuration list for PBXNativeTarget "NGPopoverForceResizeTest" */; 70 | buildPhases = ( 71 | D0C9F3072306046B00539842 /* Sources */, 72 | D0C9F3082306046B00539842 /* Frameworks */, 73 | D0C9F3092306046B00539842 /* Resources */, 74 | ); 75 | buildRules = ( 76 | ); 77 | dependencies = ( 78 | ); 79 | name = NGPopoverForceResizeTest; 80 | productName = NGPopoverForceResizeTest; 81 | productReference = D0C9F30B2306046B00539842 /* NGPopoverForceResizeTest.app */; 82 | productType = "com.apple.product-type.application"; 83 | }; 84 | /* End PBXNativeTarget section */ 85 | 86 | /* Begin PBXProject section */ 87 | D0C9F3032306046B00539842 /* Project object */ = { 88 | isa = PBXProject; 89 | attributes = { 90 | LastSwiftUpdateCheck = 1020; 91 | LastUpgradeCheck = 1020; 92 | ORGANIZATIONNAME = "Noah Gilmore"; 93 | TargetAttributes = { 94 | D0C9F30A2306046B00539842 = { 95 | CreatedOnToolsVersion = 10.2.1; 96 | }; 97 | }; 98 | }; 99 | buildConfigurationList = D0C9F3062306046B00539842 /* Build configuration list for PBXProject "NGPopoverForceResizeTest" */; 100 | compatibilityVersion = "Xcode 9.3"; 101 | developmentRegion = en; 102 | hasScannedForEncodings = 0; 103 | knownRegions = ( 104 | en, 105 | Base, 106 | ); 107 | mainGroup = D0C9F3022306046B00539842; 108 | productRefGroup = D0C9F30C2306046B00539842 /* Products */; 109 | projectDirPath = ""; 110 | projectRoot = ""; 111 | targets = ( 112 | D0C9F30A2306046B00539842 /* NGPopoverForceResizeTest */, 113 | ); 114 | }; 115 | /* End PBXProject section */ 116 | 117 | /* Begin PBXResourcesBuildPhase section */ 118 | D0C9F3092306046B00539842 /* Resources */ = { 119 | isa = PBXResourcesBuildPhase; 120 | buildActionMask = 2147483647; 121 | files = ( 122 | D0C9F3192306046E00539842 /* LaunchScreen.storyboard in Resources */, 123 | D0C9F3162306046E00539842 /* Assets.xcassets in Resources */, 124 | ); 125 | runOnlyForDeploymentPostprocessing = 0; 126 | }; 127 | /* End PBXResourcesBuildPhase section */ 128 | 129 | /* Begin PBXSourcesBuildPhase section */ 130 | D0C9F3072306046B00539842 /* Sources */ = { 131 | isa = PBXSourcesBuildPhase; 132 | buildActionMask = 2147483647; 133 | files = ( 134 | D0C9F3112306046B00539842 /* ViewController.swift in Sources */, 135 | D0C9F30F2306046B00539842 /* AppDelegate.swift in Sources */, 136 | ); 137 | runOnlyForDeploymentPostprocessing = 0; 138 | }; 139 | /* End PBXSourcesBuildPhase section */ 140 | 141 | /* Begin PBXVariantGroup section */ 142 | D0C9F3172306046E00539842 /* LaunchScreen.storyboard */ = { 143 | isa = PBXVariantGroup; 144 | children = ( 145 | D0C9F3182306046E00539842 /* Base */, 146 | ); 147 | name = LaunchScreen.storyboard; 148 | sourceTree = ""; 149 | }; 150 | /* End PBXVariantGroup section */ 151 | 152 | /* Begin XCBuildConfiguration section */ 153 | D0C9F31B2306046E00539842 /* Debug */ = { 154 | isa = XCBuildConfiguration; 155 | buildSettings = { 156 | ALWAYS_SEARCH_USER_PATHS = NO; 157 | CLANG_ANALYZER_NONNULL = YES; 158 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 159 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 160 | CLANG_CXX_LIBRARY = "libc++"; 161 | CLANG_ENABLE_MODULES = YES; 162 | CLANG_ENABLE_OBJC_ARC = YES; 163 | CLANG_ENABLE_OBJC_WEAK = YES; 164 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 165 | CLANG_WARN_BOOL_CONVERSION = YES; 166 | CLANG_WARN_COMMA = YES; 167 | CLANG_WARN_CONSTANT_CONVERSION = YES; 168 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 169 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 170 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 171 | CLANG_WARN_EMPTY_BODY = YES; 172 | CLANG_WARN_ENUM_CONVERSION = YES; 173 | CLANG_WARN_INFINITE_RECURSION = YES; 174 | CLANG_WARN_INT_CONVERSION = YES; 175 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 176 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 177 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 178 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 179 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 180 | CLANG_WARN_STRICT_PROTOTYPES = YES; 181 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 182 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 183 | CLANG_WARN_UNREACHABLE_CODE = YES; 184 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 185 | CODE_SIGN_IDENTITY = "iPhone Developer"; 186 | COPY_PHASE_STRIP = NO; 187 | DEBUG_INFORMATION_FORMAT = dwarf; 188 | ENABLE_STRICT_OBJC_MSGSEND = YES; 189 | ENABLE_TESTABILITY = YES; 190 | GCC_C_LANGUAGE_STANDARD = gnu11; 191 | GCC_DYNAMIC_NO_PIC = NO; 192 | GCC_NO_COMMON_BLOCKS = YES; 193 | GCC_OPTIMIZATION_LEVEL = 0; 194 | GCC_PREPROCESSOR_DEFINITIONS = ( 195 | "DEBUG=1", 196 | "$(inherited)", 197 | ); 198 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 199 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 200 | GCC_WARN_UNDECLARED_SELECTOR = YES; 201 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 202 | GCC_WARN_UNUSED_FUNCTION = YES; 203 | GCC_WARN_UNUSED_VARIABLE = YES; 204 | IPHONEOS_DEPLOYMENT_TARGET = 12.2; 205 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; 206 | MTL_FAST_MATH = YES; 207 | ONLY_ACTIVE_ARCH = YES; 208 | SDKROOT = iphoneos; 209 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 210 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 211 | }; 212 | name = Debug; 213 | }; 214 | D0C9F31C2306046E00539842 /* Release */ = { 215 | isa = XCBuildConfiguration; 216 | buildSettings = { 217 | ALWAYS_SEARCH_USER_PATHS = NO; 218 | CLANG_ANALYZER_NONNULL = YES; 219 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 220 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 221 | CLANG_CXX_LIBRARY = "libc++"; 222 | CLANG_ENABLE_MODULES = YES; 223 | CLANG_ENABLE_OBJC_ARC = YES; 224 | CLANG_ENABLE_OBJC_WEAK = YES; 225 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 226 | CLANG_WARN_BOOL_CONVERSION = YES; 227 | CLANG_WARN_COMMA = YES; 228 | CLANG_WARN_CONSTANT_CONVERSION = YES; 229 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 230 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 231 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 232 | CLANG_WARN_EMPTY_BODY = YES; 233 | CLANG_WARN_ENUM_CONVERSION = YES; 234 | CLANG_WARN_INFINITE_RECURSION = YES; 235 | CLANG_WARN_INT_CONVERSION = YES; 236 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 237 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 238 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 239 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 240 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 241 | CLANG_WARN_STRICT_PROTOTYPES = YES; 242 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 243 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 244 | CLANG_WARN_UNREACHABLE_CODE = YES; 245 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 246 | CODE_SIGN_IDENTITY = "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 = gnu11; 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 = 12.2; 260 | MTL_ENABLE_DEBUG_INFO = NO; 261 | MTL_FAST_MATH = YES; 262 | SDKROOT = iphoneos; 263 | SWIFT_COMPILATION_MODE = wholemodule; 264 | SWIFT_OPTIMIZATION_LEVEL = "-O"; 265 | VALIDATE_PRODUCT = YES; 266 | }; 267 | name = Release; 268 | }; 269 | D0C9F31E2306046E00539842 /* Debug */ = { 270 | isa = XCBuildConfiguration; 271 | buildSettings = { 272 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 273 | CODE_SIGN_STYLE = Automatic; 274 | DEVELOPMENT_TEAM = VYDU87PPV5; 275 | INFOPLIST_FILE = NGPopoverForceResizeTest/Info.plist; 276 | LD_RUNPATH_SEARCH_PATHS = ( 277 | "$(inherited)", 278 | "@executable_path/Frameworks", 279 | ); 280 | PRODUCT_BUNDLE_IDENTIFIER = com.plangrid.NGPopoverForceResizeTest; 281 | PRODUCT_NAME = "$(TARGET_NAME)"; 282 | SWIFT_VERSION = 5.0; 283 | TARGETED_DEVICE_FAMILY = "1,2"; 284 | }; 285 | name = Debug; 286 | }; 287 | D0C9F31F2306046E00539842 /* Release */ = { 288 | isa = XCBuildConfiguration; 289 | buildSettings = { 290 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 291 | CODE_SIGN_STYLE = Automatic; 292 | DEVELOPMENT_TEAM = VYDU87PPV5; 293 | INFOPLIST_FILE = NGPopoverForceResizeTest/Info.plist; 294 | LD_RUNPATH_SEARCH_PATHS = ( 295 | "$(inherited)", 296 | "@executable_path/Frameworks", 297 | ); 298 | PRODUCT_BUNDLE_IDENTIFIER = com.plangrid.NGPopoverForceResizeTest; 299 | PRODUCT_NAME = "$(TARGET_NAME)"; 300 | SWIFT_VERSION = 5.0; 301 | TARGETED_DEVICE_FAMILY = "1,2"; 302 | }; 303 | name = Release; 304 | }; 305 | /* End XCBuildConfiguration section */ 306 | 307 | /* Begin XCConfigurationList section */ 308 | D0C9F3062306046B00539842 /* Build configuration list for PBXProject "NGPopoverForceResizeTest" */ = { 309 | isa = XCConfigurationList; 310 | buildConfigurations = ( 311 | D0C9F31B2306046E00539842 /* Debug */, 312 | D0C9F31C2306046E00539842 /* Release */, 313 | ); 314 | defaultConfigurationIsVisible = 0; 315 | defaultConfigurationName = Release; 316 | }; 317 | D0C9F31D2306046E00539842 /* Build configuration list for PBXNativeTarget "NGPopoverForceResizeTest" */ = { 318 | isa = XCConfigurationList; 319 | buildConfigurations = ( 320 | D0C9F31E2306046E00539842 /* Debug */, 321 | D0C9F31F2306046E00539842 /* Release */, 322 | ); 323 | defaultConfigurationIsVisible = 0; 324 | defaultConfigurationName = Release; 325 | }; 326 | /* End XCConfigurationList section */ 327 | }; 328 | rootObject = D0C9F3032306046B00539842 /* Project object */; 329 | } 330 | --------------------------------------------------------------------------------