47 Commits

Author SHA1 Message Date
Drew Olbrich 2de1a0a7b1 Release 1.7.0 2023-08-27 09:43:17 -07:00
Drew Olbrich 37fa122058 Update Release-Steps.md for 1.7.0 2023-08-27 09:40:11 -07:00
Drew Olbrich ec24bce7d8 Use visionOS for OS version instead of xrOS 2023-08-27 09:33:48 -07:00
Drew Olbrich a4cac9cf19 Update Release-Steps.md for 1.6.7 2023-08-27 09:32:59 -07:00
Drew Olbrich f84e7ac63e Don't share build schemes so they don't show up in projects that include the framework 2023-08-27 09:29:17 -07:00
Drew Olbrich ddb0700f7a Fix visionOS compiler errors 2023-06-25 14:11:36 -07:00
Drew Olbrich 6a1a0ab039 Use shields.io badges supplied by Swift Package Index 2023-03-27 07:30:08 -07:00
Drew Olbrich a9862768c9 Release 1.6.6 2023-03-26 16:54:45 -07:00
Drew Olbrich 638bdd85f7 Disable Swift package test targets 2023-03-26 16:52:24 -07:00
Drew Olbrich 723ec56928 Make ContentView public 2023-03-26 16:23:48 -07:00
Drew Olbrich d870af6f60 Release 1.6.5 2023-03-26 12:28:53 -07:00
Drew Olbrich 4c98d75ebf Update release steps 2023-03-26 12:27:24 -07:00
Drew Olbrich 66b65065eb Update release number in Release-Steps.md 2023-03-26 12:26:27 -07:00
Drew Olbrich 6753c18c88 Add Release-Steps.md to project 2023-03-26 12:25:48 -07:00
Drew Olbrich 2c696f793c Move ContentView.swift to Tests/Common shared target 2023-03-26 12:24:35 -07:00
Drew Olbrich e0fd17dcf9 Add package validation to release steps 2023-03-26 12:00:05 -07:00
Drew Olbrich 22dc85ef9a Add verifying tests to the release steps 2023-03-26 11:46:02 -07:00
Drew Olbrich db3184c16c Remove .travis.yml 2023-03-25 21:50:33 -07:00
Drew Olbrich 1fd7e5f2c1 Fix SwiftLint warning 2023-03-25 21:49:32 -07:00
Drew Olbrich 2d954c904d Add Release-Steps.md 2023-03-25 20:30:12 -07:00
Drew Olbrich 2de54e1387 Release 1.6.4 2023-03-25 20:15:03 -07:00
Drew Olbrich 686ca24a06 Remove .travis.yml 2023-03-25 20:13:26 -07:00
Drew Olbrich a8cb461213 Rename master branch to main 2023-03-25 19:04:12 -07:00
Drew Olbrich 181d20315c Remove TravisCI badge 2023-03-25 19:01:24 -07:00
Drew Olbrich 583f01a149 Revert "Add shields.io badges from Swift Package Index"
This reverts commit c6575ac042.
2023-03-24 15:51:30 -07:00
Drew Olbrich c6575ac042 Add shields.io badges from Swift Package Index 2023-03-24 15:47:55 -07:00
Drew Olbrich 9f83a13354 Set background color in example code 2023-01-22 13:32:35 -08:00
Drew Olbrich a47b2d80f3 Update README 2023-01-22 11:16:31 -08:00
Drew Olbrich 6691322781 Set version to 1.6.3 2022-10-22 15:02:47 -07:00
Drew Olbrich 8bdbc44f39 Fix Xcode 14 SwiftLint dependency analysis warning 2022-10-22 12:58:55 -07:00
Drew Olbrich 5ae5c97f00 Fix access to SwiftLint on M1 macs 2022-10-22 12:57:47 -07:00
Drew Olbrich 1108944654 Update comments 2022-05-18 18:25:37 -07:00
Drew Olbrich 365840db98 Update Travis CI link 2022-04-16 12:47:45 -07:00
Drew Olbrich 1024939b76 Set podspec version to 1.6.2 2021-07-18 10:01:34 -07:00
Drew Olbrich c43e82be23 Revert "Change Travis CI xcode_scheme to ScrollingContentViewControllerTests"
This reverts commit 33c590a228.
2021-07-18 09:55:54 -07:00
Drew Olbrich 33c590a228 Change Travis CI xcode_scheme to ScrollingContentViewControllerTests 2021-07-18 09:48:21 -07:00
Drew Olbrich f26290d678 Add ScrollingContentViewControllerTests scheme 2021-07-18 09:47:57 -07:00
Drew Olbrich 0ce377769e Move Info.plist to Sources 2021-07-18 09:34:32 -07:00
Drew Olbrich dbea32781b Fix Xcode 13 compiler errors 2021-07-18 09:16:48 -07:00
Drew Olbrich 92ebbd1a60 Reorder accessors 2021-07-17 13:56:44 -07:00
Drew Olbrich b771157496 Update SPM installation instructions 2021-06-10 07:31:45 -07:00
Drew Olbrich a253a13ffb Update SPM installation instructions 2021-06-10 07:28:16 -07:00
Drew Olbrich 4c426503c9 Restore Info.plist 2021-06-05 10:00:48 -07:00
Drew Olbrich 2993da6f9a Use iPhone 12 Pro for Travis 2021-06-05 09:42:29 -07:00
Drew Olbrich 7d0e772c3e Update Travis to Xcode 12.5, iOS 14.5 2021-06-05 09:36:57 -07:00
Drew Olbrich ad77cebc00 Switch to travis-ci.com 2021-06-05 09:30:30 -07:00
Drew Olbrich d02547e758 Remove comments 2021-06-05 09:13:09 -07:00
26 changed files with 428 additions and 137 deletions
+1
View File
@@ -39,6 +39,7 @@ playground.xcworkspace
# Package.pins
# Package.resolved
.build/
.swiftpm/xcode/xcuserdata
# CocoaPods
#
-5
View File
@@ -1,5 +0,0 @@
language: swift
osx_image: xcode10.2
xcode_project: ScrollingContentViewController.xcodeproj
xcode_scheme: ScrollingContentViewController
xcode_destination: platform=iOS Simulator,OS=12.1,name=iPhone X
@@ -100,7 +100,6 @@ class SignUpViewController: ScrollingContentViewController {
textField.isSecureTextEntry = isSecureTextEntry
}
// swiftlint:disable:next function_body_length
private func addConstraints() {
logoImageView.translatesAutoresizingMaskIntoConstraints = false
nameTextField.translatesAutoresizingMaskIntoConstraints = false
+33 -11
View File
@@ -1,5 +1,4 @@
// swift-tools-version:5.3
// The swift-tools-version declares the minimum version of Swift required to build this package.
import PackageDescription
@@ -9,23 +8,46 @@ let package = Package(
.iOS(.v12)
],
products: [
// Products define the executables and libraries a package produces, and make them visible to other packages.
.library(
name: "ScrollingContentViewController",
targets: ["ScrollingContentViewController"])
targets: ["ScrollingContentViewController"]
)
],
dependencies: [
// Dependencies declare other packages that this package depends on.
// .package(url: /* package url */, from: "1.0.0"),
],
targets: [
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
// Targets can depend on other targets in this package, and on products in packages this package depends on.
.target(
name: "ScrollingContentViewController",
dependencies: []),
.testTarget(
name: "ScrollingContentViewControllerTests",
dependencies: ["ScrollingContentViewController"])
dependencies: []
)
// .target(
// name: "Common",
// dependencies: ["ScrollingContentViewController"],
// path: "Tests/Common"
// ),
// .testTarget(
// name: "StoryboardTests",
// dependencies: ["ScrollingContentViewController", "Common"]
// ),
// .testTarget(
// name: "CodeTests",
// dependencies: ["ScrollingContentViewController", "Common"]
// ),
// .testTarget(
// name: "ManagerTests",
// dependencies: ["ScrollingContentViewController", "Common"]
// ),
// .testTarget(
// name: "IntrinsicSizeTests",
// dependencies: ["ScrollingContentViewController"]
// ),
// .testTarget(
// name: "KeyboardTests",
// dependencies: ["ScrollingContentViewController"]
// ),
// .testTarget(
// name: "InsetContentViewKeyboardTests",
// dependencies: ["ScrollingContentViewController"]
// )
]
)
+15 -11
View File
@@ -1,10 +1,8 @@
# ScrollingContentViewController
[![Travis](https://img.shields.io/travis/drewolbrich/ScrollingContentViewController.svg)](https://travis-ci.org/drewolbrich/ScrollingContentViewController)
[![Platform](https://img.shields.io/badge/platform-iOS-lightgray.svg)](http://developer.apple.com/ios)
[![Swift 5](https://img.shields.io/badge/swift-5-red.svg?style=flat)](https://developer.apple.com/swift)
[![](https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2Fdrewolbrich%2FScrollingContentViewController%2Fbadge%3Ftype%3Dswift-versions)](https://swiftpackageindex.com/drewolbrich/ScrollingContentViewController)
[![](https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2Fdrewolbrich%2FScrollingContentViewController%2Fbadge%3Ftype%3Dplatforms)](https://swiftpackageindex.com/drewolbrich/ScrollingContentViewController)
[![License](https://img.shields.io/github/license/drewolbrich/ScrollingContentViewController.svg)](LICENSE)
[![Twitter](https://img.shields.io/badge/twitter-@drewolbrich-blue.svg)](http://twitter.com/drewolbrich)
* [Overview](#overview)
* [Background](#background)
@@ -29,7 +27,7 @@ A common UIKit Auto Layout task involves creating a view controller with a fixed
For example, consider this sign up screen, which fits iPhone Xs, but not iPhone SE with a keyboard:
<img src="https://github.com/drewolbrich/ScrollingContentViewController/raw/master/Images/Overview-Comparison.png" width="888px">
<img src="https://github.com/drewolbrich/ScrollingContentViewController/raw/main/Images/Overview-Comparison.png" width="888px">
This case can be handled by nesting the view inside a scroll view. You could do this manually in Interface Builder, as described by Apple's [Working with Scroll Views](https://developer.apple.com/library/archive/documentation/UserExperience/Conceptual/AutolayoutPG/WorkingwithScrollViews.html) documentation, but many steps are required. If your view contains text fields, you'll have to write code to adjust the view to compensate for the presented keyboard, as described in [Managing the Keyboard](https://developer.apple.com/library/archive/documentation/StringsTextFonts/Conceptual/TextAndWebiPhoneOS/KeyboardManagement/KeyboardManagement.html#//apple_ref/doc/uid/TP40009542-CH5-SW3). However, handling the keyboard robustly is [surprisingly complicated](#keyboard-resize-filtering), especially if your app presents a sequence of screens with keyboards in the context of a navigation controller, or when device orientation support is required.
@@ -43,7 +41,11 @@ An explanation of [how ScrollingContentViewController works internally](#how-it-
## Installation
ScrollingContentViewController may be added as a Swift Package dependency in Xcode.
To install ScrollingContentViewController using Swift Package Manager, add this package URL to your project:
```
https://github.com/drewolbrich/ScrollingContentViewController
```
To install ScrollingContentViewController using CocoaPods, add this line to your Podfile:
@@ -81,7 +83,7 @@ To configure `ScrollingContentViewController` in a storyboard:
2. In Interface Builder's outline view, control-click your view controller and connect its [`contentView`](#contentView) outlet to your view controller's root view or any other subview that you want to make scrollable.
<img src="https://github.com/drewolbrich/ScrollingContentViewController/raw/master/Images/Usage-Storyboards.png" width="471px">
<img src="https://github.com/drewolbrich/ScrollingContentViewController/raw/main/Images/Usage-Storyboards.png" width="471px">
3. If your view controller defines a [`viewDidLoad`](https://developer.apple.com/documentation/uikit/uiviewcontroller/1621495-viewdidload) method, call `super.viewDidLoad` if you aren't already doing so.
@@ -119,6 +121,8 @@ To integrate `ScrollingContentViewController` programmatically:
override func viewDidLoad() {
super.viewDidLoad()
view.backgroundColor = .systemBackground
contentView = UIView()
// Add all controls to contentView instead of view.
@@ -142,7 +146,7 @@ To determine the size of the scroll view's content size, ScrollingContentViewCon
If the size of your view controller is intentionally highly constrained (e.g. consisting exclusively of constraints with [`required`](https://developer.apple.com/documentation/uikit/uilayoutpriority/1622241-required) priority and lacking [`greaterThanOrEqual`](https://developer.apple.com/documentation/uikit/nslayoutconstraint/relation/greaterthanorequal) relation constraints), you may see Auto Layout constraint errors in Interface Builder if the constraints don't match the simulated size of the view, for example, when you switch between simulated device sizes. The easiest way to resolve this issue is to reduce the priority of one of your constraints. The value 240 is a good choice because it is lower than the default content hugging priority (250) and consequently, it will help avoid the undesirable behavior where text fields and labels without height constraints stretch vertically.
<img src="https://github.com/drewolbrich/ScrollingContentViewController/raw/master/Images/Usage-Auto-Layout-Considerations.png" width="663px">
<img src="https://github.com/drewolbrich/ScrollingContentViewController/raw/main/Images/Usage-Auto-Layout-Considerations.png" width="663px">
### Intrinsic Content Size
@@ -154,7 +158,7 @@ The default `UIView` content hugging priority is [`defaultLow`](https://develope
The content view is positioned within the scroll view's safe area. Consequently, the content view's background color won't extend underneath the status bar, home indicator, navigation bar, or toolbar.
<img src="https://github.com/drewolbrich/ScrollingContentViewController/raw/master/Images/Caveats-Background-Color-Content-View.png" width="233px">
<img src="https://github.com/drewolbrich/ScrollingContentViewController/raw/main/Images/Caveats-Background-Color-Content-View.png" width="233px">
To specify a background color that extends to the edges of the screen:
@@ -187,7 +191,7 @@ UIView.animate(withDuration: 0.5, delay: 0, usingSpringWithDamping: 1, initialSp
In Interface Builder, it's possible to design a view controller that is intentionally larger than the height of the screen. To do this, change the view controller's simulated size to Freeform and adjust its height. When used with ScrollingContentViewController, the view controller's oversized content view will scroll freely, assuming its constraints require it to be larger than the screen.
<img src="https://github.com/drewolbrich/ScrollingContentViewController/raw/master/Images/Usage-Oversized-View-Controllers.png" width="609px">
<img src="https://github.com/drewolbrich/ScrollingContentViewController/raw/main/Images/Usage-Oversized-View-Controllers.png" width="609px">
## Usage Without Subclassing
@@ -387,7 +391,7 @@ The optional `margin` parameter specifies an extra margin around the first respo
ScrollingContentViewController inserts a scroll view between the content view and its superview, using Auto Layout to constrain the scroll view's content layout guide to the size of the content view. The content view's size is also constrained to be greater than or equal to the size of the scroll view's safe area, so it can utilize the full area of the screen assigned to the scroll view.
<img src="https://github.com/drewolbrich/ScrollingContentViewController/raw/master/Images/How-It-Works-View-Hierarchy.png" width="496px">
<img src="https://github.com/drewolbrich/ScrollingContentViewController/raw/main/Images/How-It-Works-View-Hierarchy.png" width="496px">
When the content view is first assigned, if it has a superview, the scroll view replaces it in the view hierarchy and all of the superview's constraints that reference the content view are retargeted to the content view. The content view's width and height constraints and autoresizing mask are transferred to the scroll view.
+51
View File
@@ -0,0 +1,51 @@
# Release Steps
1. Determine the new release number, like `1.7.0` and search and replace the previous version number with it in this file.
2. Verify that the tests pass:
```
xcodebuild test -scheme ScrollingContentViewControllerTests -sdk iphonesimulator16.4 -destination "OS=16.4,name=iPhone 14"
```
3. In `Sources > Info.plist`, update `Bundle version string` with the new release number.
4. In `ScrollingContentViewController.podspec`, update `s.version` with the new release number.
5. Verify that the Swift package file is valid:
```
swift package describe
```
6. Verify that the Cocoapods spec file is valid:
```
pod lib lint
```
7. Commit the updated release number and Cocopods spec file:
```
git add -A && git commit -m "Release 1.7.0"
git push
```
8. Create a tag for the new release. For consistency, **do not** prefix tags with 'v'.
```
git tag '1.7.0'
git push --tags
```
9. Submit the new release to the Cocoapods specs repo:
```
pod trunk push ScrollingContentViewController.podspec
```
If that doesn't work, first follow the steps at https://guides.cocoapods.org/making/getting-setup-with-trunk.html
using the email address in `ScrollingContentViewController.podspec` to register the local device with the Cocoapods trunk.
```
pod trunk register drew@retroactivefiasco.com 'Drew Olbrich' --description='MacBook Pro'
```
10. Draft a new release on GitHub at https://github.com/drewolbrich/ScrollingContentViewController/releases
11. For the new release, use the release number 1.7.0 as the title and prefix each item in the description with bullets, indicated by '*'.
12. Leave **Set as the latest release** checked and click **Publish**.
+1 -1
View File
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'ScrollingContentViewController'
s.version = '1.6.1'
s.version = '1.7.0'
s.summary = 'A Swift library that simplifies making a view controller\'s view scrollable'
s.description = <<-DESC
@@ -3,15 +3,21 @@
archiveVersion = 1;
classes = {
};
objectVersion = 50;
objectVersion = 54;
objects = {
/* Begin PBXBuildFile section */
3A06577C2200A552005BE8CC /* IsUnitTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3A06577B2200A552005BE8CC /* IsUnitTest.swift */; };
3A3652F621F38E750010CE55 /* StoryboardTests.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 3A3652F521F38E750010CE55 /* StoryboardTests.storyboard */; };
3A3652F821F390110010CE55 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3A3652F721F390110010CE55 /* ContentView.swift */; };
3A1A174626A4839F006EE907 /* UIView+FirstResponder.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3A1A174526A4839F006EE907 /* UIView+FirstResponder.swift */; };
3A1A176026A485BB006EE907 /* CodeTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3A1A174B26A48489006EE907 /* CodeTests.swift */; };
3A1A176226A485C3006EE907 /* StoryboardTests.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 3A1A175426A48489006EE907 /* StoryboardTests.storyboard */; };
3A1A176326A485C3006EE907 /* IntrinsicSizeTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3A1A174926A48489006EE907 /* IntrinsicSizeTests.swift */; };
3A1A176426A485C3006EE907 /* IntrinsicSizeContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3A1A174E26A48489006EE907 /* IntrinsicSizeContentView.swift */; };
3A1A176526A485C3006EE907 /* StoryboardTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3A1A175526A48489006EE907 /* StoryboardTests.swift */; };
3A1A176626A485C3006EE907 /* KeyboardTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3A1A175026A48489006EE907 /* KeyboardTests.swift */; };
3A1A176726A485C3006EE907 /* ManagerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3A1A175226A48489006EE907 /* ManagerTests.swift */; };
3A1A176826A485C3006EE907 /* InsetContentViewKeyboardTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3A1A174D26A48489006EE907 /* InsetContentViewKeyboardTests.swift */; };
3A5702D821E2CBB600E4CC55 /* ScrollingContentViewController.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3A5702CE21E2CBB600E4CC55 /* ScrollingContentViewController.framework */; };
3A5702DD21E2CBB600E4CC55 /* StoryboardTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3A5702DC21E2CBB600E4CC55 /* StoryboardTests.swift */; };
3A5702DF21E2CBB600E4CC55 /* ScrollingContentViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = 3A5702D121E2CBB600E4CC55 /* ScrollingContentViewController.h */; settings = {ATTRIBUTES = (Public, ); }; };
3A61C80721EB9028001F76A8 /* SecondViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3A61C80621EB9028001F76A8 /* SecondViewController.swift */; };
3A61C80921EB9032001F76A8 /* ThirdViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3A61C80821EB9032001F76A8 /* ThirdViewController.swift */; };
@@ -34,10 +40,9 @@
3A83273921E700A000E8D95C /* SignUpController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3A83273721E700A000E8D95C /* SignUpController.swift */; };
3A83273B21E703F600E8D95C /* SignUpControllerDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3A83273A21E703F600E8D95C /* SignUpControllerDelegate.swift */; };
3A83273C21E703F600E8D95C /* SignUpControllerDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3A83273A21E703F600E8D95C /* SignUpControllerDelegate.swift */; };
3A881DB9224525F500E21CA2 /* InsetContentViewKeyboardTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3A881DB72245257E00E21CA2 /* InsetContentViewKeyboardTests.swift */; };
3A89319329D0D127009BD5DD /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3A89319229D0D127009BD5DD /* ContentView.swift */; };
3AAC048F21E2D4C500D94DA5 /* ScrollingContentViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AAC048E21E2D4C500D94DA5 /* ScrollingContentViewController.swift */; };
3AAC049121E2D4F100D94DA5 /* ScrollingContentViewManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AAC049021E2D4F100D94DA5 /* ScrollingContentViewManager.swift */; };
3AAC049821E2F01C00D94DA5 /* UIResponder+Current.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AAC049321E2F01C00D94DA5 /* UIResponder+Current.swift */; };
3AAC049921E2F01C00D94DA5 /* KeyboardObserver.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AAC049421E2F01C00D94DA5 /* KeyboardObserver.swift */; };
3AAC049A21E2F01C00D94DA5 /* ScrollViewBounceController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AAC049521E2F01C00D94DA5 /* ScrollViewBounceController.swift */; };
3AAC049B21E2F01C00D94DA5 /* AdditionalSafeAreaInsetsController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AAC049621E2F01C00D94DA5 /* AdditionalSafeAreaInsetsController.swift */; };
@@ -66,11 +71,6 @@
3AAC04FC21E4534600D94DA5 /* RoundedCornersImage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AAC04C421E3A43100D94DA5 /* RoundedCornersImage.swift */; };
3AAC04FD21E4534600D94DA5 /* GradientBackgroundView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AAC04C521E3A43100D94DA5 /* GradientBackgroundView.swift */; };
3AC88F5221E5B7F600EED460 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AC88F5021E5B7F600EED460 /* AppDelegate.swift */; };
3AD597C921F3964000F220A0 /* CodeTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AD597C821F3964000F220A0 /* CodeTests.swift */; };
3AD597CB21F3995A00F220A0 /* ManagerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AD597CA21F3995A00F220A0 /* ManagerTests.swift */; };
3AD597CD21F3AC2000F220A0 /* IntrinsicSizeContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AD597CC21F3AC2000F220A0 /* IntrinsicSizeContentView.swift */; };
3AD597CF21F3AD8000F220A0 /* IntrinsicSizeTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AD597CE21F3AD8000F220A0 /* IntrinsicSizeTests.swift */; };
3AD597D121F3B70400F220A0 /* KeyboardTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AD597D021F3B70400F220A0 /* KeyboardTests.swift */; };
3AD597D321F420ED00F220A0 /* KeyboardNotificationManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AD597D221F420ED00F220A0 /* KeyboardNotificationManager.swift */; };
3AD597D521F4221B00F220A0 /* KeyboardNotificationObserving.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AD597D421F4221B00F220A0 /* KeyboardNotificationObserving.swift */; };
3ADD380A21EBFC6200396B7A /* KeyboardFrameEvent.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3ADD380921EBFC6200396B7A /* KeyboardFrameEvent.swift */; };
@@ -199,13 +199,20 @@
/* Begin PBXFileReference section */
3A06577B2200A552005BE8CC /* IsUnitTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = IsUnitTest.swift; sourceTree = "<group>"; };
3A3652F521F38E750010CE55 /* StoryboardTests.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = StoryboardTests.storyboard; sourceTree = "<group>"; };
3A3652F721F390110010CE55 /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = "<group>"; };
3A1A174526A4839F006EE907 /* UIView+FirstResponder.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIView+FirstResponder.swift"; sourceTree = "<group>"; };
3A1A174726A483CB006EE907 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
3A1A174926A48489006EE907 /* IntrinsicSizeTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = IntrinsicSizeTests.swift; sourceTree = "<group>"; };
3A1A174B26A48489006EE907 /* CodeTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CodeTests.swift; sourceTree = "<group>"; };
3A1A174D26A48489006EE907 /* InsetContentViewKeyboardTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = InsetContentViewKeyboardTests.swift; sourceTree = "<group>"; };
3A1A174E26A48489006EE907 /* IntrinsicSizeContentView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = IntrinsicSizeContentView.swift; sourceTree = "<group>"; };
3A1A175026A48489006EE907 /* KeyboardTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = KeyboardTests.swift; sourceTree = "<group>"; };
3A1A175226A48489006EE907 /* ManagerTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ManagerTests.swift; sourceTree = "<group>"; };
3A1A175426A48489006EE907 /* StoryboardTests.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = StoryboardTests.storyboard; sourceTree = "<group>"; };
3A1A175526A48489006EE907 /* StoryboardTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = StoryboardTests.swift; sourceTree = "<group>"; };
3A1A176A26A48701006EE907 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
3A5702CE21E2CBB600E4CC55 /* ScrollingContentViewController.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = ScrollingContentViewController.framework; sourceTree = BUILT_PRODUCTS_DIR; };
3A5702D121E2CBB600E4CC55 /* ScrollingContentViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ScrollingContentViewController.h; sourceTree = "<group>"; };
3A5702D721E2CBB600E4CC55 /* ScrollingContentViewControllerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = ScrollingContentViewControllerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
3A5702DC21E2CBB600E4CC55 /* StoryboardTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StoryboardTests.swift; sourceTree = "<group>"; };
3A5702DE21E2CBB600E4CC55 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
3A5B3C98265D3D2100E26100 /* Package.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Package.swift; sourceTree = "<group>"; };
3A61C80621EB9028001F76A8 /* SecondViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SecondViewController.swift; sourceTree = "<group>"; };
3A61C80821EB9032001F76A8 /* ThirdViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ThirdViewController.swift; sourceTree = "<group>"; };
@@ -216,13 +223,13 @@
3A7014BB21EBD723002C6740 /* LaunchScreen.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = LaunchScreen.storyboard; sourceTree = "<group>"; };
3A83273721E700A000E8D95C /* SignUpController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SignUpController.swift; sourceTree = "<group>"; };
3A83273A21E703F600E8D95C /* SignUpControllerDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SignUpControllerDelegate.swift; sourceTree = "<group>"; };
3A881DB72245257E00E21CA2 /* InsetContentViewKeyboardTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InsetContentViewKeyboardTests.swift; sourceTree = "<group>"; };
3A89319229D0D127009BD5DD /* ContentView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = "<group>"; };
3A89319429D0D3AC009BD5DD /* Release-Steps.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = "Release-Steps.md"; sourceTree = "<group>"; };
3AAC048821E2D3FD00D94DA5 /* README.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = "<group>"; };
3AAC048921E2D3FD00D94DA5 /* LICENSE */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = LICENSE; sourceTree = "<group>"; };
3AAC048A21E2D3FD00D94DA5 /* ScrollingContentViewController.podspec */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; fileEncoding = 4; path = ScrollingContentViewController.podspec; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.ruby; };
3AAC048A21E2D3FD00D94DA5 /* ScrollingContentViewController.podspec */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; fileEncoding = 4; path = ScrollingContentViewController.podspec; sourceTree = "<group>"; };
3AAC048E21E2D4C500D94DA5 /* ScrollingContentViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ScrollingContentViewController.swift; sourceTree = "<group>"; };
3AAC049021E2D4F100D94DA5 /* ScrollingContentViewManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ScrollingContentViewManager.swift; sourceTree = "<group>"; };
3AAC049321E2F01C00D94DA5 /* UIResponder+Current.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIResponder+Current.swift"; sourceTree = "<group>"; };
3AAC049421E2F01C00D94DA5 /* KeyboardObserver.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = KeyboardObserver.swift; sourceTree = "<group>"; };
3AAC049521E2F01C00D94DA5 /* ScrollViewBounceController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ScrollViewBounceController.swift; sourceTree = "<group>"; };
3AAC049621E2F01C00D94DA5 /* AdditionalSafeAreaInsetsController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AdditionalSafeAreaInsetsController.swift; sourceTree = "<group>"; };
@@ -246,12 +253,6 @@
3AC88F4F21E5B7F500EED460 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
3AC88F5021E5B7F600EED460 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
3ACE0D7B220B34BE0093FE5A /* .swiftlint.yml */ = {isa = PBXFileReference; lastKnownFileType = text; path = .swiftlint.yml; sourceTree = "<group>"; };
3ACE0D7C220B34BE0093FE5A /* .travis.yml */ = {isa = PBXFileReference; lastKnownFileType = text; path = .travis.yml; sourceTree = "<group>"; };
3AD597C821F3964000F220A0 /* CodeTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CodeTests.swift; sourceTree = "<group>"; };
3AD597CA21F3995A00F220A0 /* ManagerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ManagerTests.swift; sourceTree = "<group>"; };
3AD597CC21F3AC2000F220A0 /* IntrinsicSizeContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = IntrinsicSizeContentView.swift; sourceTree = "<group>"; };
3AD597CE21F3AD8000F220A0 /* IntrinsicSizeTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = IntrinsicSizeTests.swift; sourceTree = "<group>"; };
3AD597D021F3B70400F220A0 /* KeyboardTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KeyboardTests.swift; sourceTree = "<group>"; };
3AD597D221F420ED00F220A0 /* KeyboardNotificationManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KeyboardNotificationManager.swift; sourceTree = "<group>"; };
3AD597D421F4221B00F220A0 /* KeyboardNotificationObserving.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KeyboardNotificationObserving.swift; sourceTree = "<group>"; };
3ADD380921EBFC6200396B7A /* KeyboardFrameEvent.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KeyboardFrameEvent.swift; sourceTree = "<group>"; };
@@ -333,15 +334,65 @@
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
3A1A174826A48489006EE907 /* IntrinsicSizeTests */ = {
isa = PBXGroup;
children = (
3A1A174926A48489006EE907 /* IntrinsicSizeTests.swift */,
3A1A174E26A48489006EE907 /* IntrinsicSizeContentView.swift */,
);
path = IntrinsicSizeTests;
sourceTree = "<group>";
};
3A1A174A26A48489006EE907 /* CodeTests */ = {
isa = PBXGroup;
children = (
3A1A174B26A48489006EE907 /* CodeTests.swift */,
);
path = CodeTests;
sourceTree = "<group>";
};
3A1A174C26A48489006EE907 /* InsetContentViewKeyboardTests */ = {
isa = PBXGroup;
children = (
3A1A174D26A48489006EE907 /* InsetContentViewKeyboardTests.swift */,
);
path = InsetContentViewKeyboardTests;
sourceTree = "<group>";
};
3A1A174F26A48489006EE907 /* KeyboardTests */ = {
isa = PBXGroup;
children = (
3A1A175026A48489006EE907 /* KeyboardTests.swift */,
);
path = KeyboardTests;
sourceTree = "<group>";
};
3A1A175126A48489006EE907 /* ManagerTests */ = {
isa = PBXGroup;
children = (
3A1A175226A48489006EE907 /* ManagerTests.swift */,
);
path = ManagerTests;
sourceTree = "<group>";
};
3A1A175326A48489006EE907 /* StoryboardTests */ = {
isa = PBXGroup;
children = (
3A1A175426A48489006EE907 /* StoryboardTests.storyboard */,
3A1A175526A48489006EE907 /* StoryboardTests.swift */,
);
path = StoryboardTests;
sourceTree = "<group>";
};
3A5702C421E2CBB600E4CC55 = {
isa = PBXGroup;
children = (
3AAC048921E2D3FD00D94DA5 /* LICENSE */,
3AAC048821E2D3FD00D94DA5 /* README.md */,
3A89319429D0D3AC009BD5DD /* Release-Steps.md */,
3A5B3C98265D3D2100E26100 /* Package.swift */,
3AAC048A21E2D3FD00D94DA5 /* ScrollingContentViewController.podspec */,
3ACE0D7B220B34BE0093FE5A /* .swiftlint.yml */,
3ACE0D7C220B34BE0093FE5A /* .travis.yml */,
3A5702D021E2CBB600E4CC55 /* Sources */,
3AAC04A521E39FBF00D94DA5 /* Examples */,
3A5702DB21E2CBB600E4CC55 /* Tests */,
@@ -366,6 +417,7 @@
3A5702D021E2CBB600E4CC55 /* Sources */ = {
isa = PBXGroup;
children = (
3A1A174726A483CB006EE907 /* Info.plist */,
3A5B3CB9265D481400E26100 /* ScrollingContentViewController */,
);
path = Sources;
@@ -374,16 +426,14 @@
3A5702DB21E2CBB600E4CC55 /* Tests */ = {
isa = PBXGroup;
children = (
3A5702DC21E2CBB600E4CC55 /* StoryboardTests.swift */,
3AD597C821F3964000F220A0 /* CodeTests.swift */,
3AD597CA21F3995A00F220A0 /* ManagerTests.swift */,
3AD597CE21F3AD8000F220A0 /* IntrinsicSizeTests.swift */,
3AD597D021F3B70400F220A0 /* KeyboardTests.swift */,
3A881DB72245257E00E21CA2 /* InsetContentViewKeyboardTests.swift */,
3A3652F521F38E750010CE55 /* StoryboardTests.storyboard */,
3A3652F721F390110010CE55 /* ContentView.swift */,
3AD597CC21F3AC2000F220A0 /* IntrinsicSizeContentView.swift */,
3A5702DE21E2CBB600E4CC55 /* Info.plist */,
3A1A176A26A48701006EE907 /* Info.plist */,
3A89319129D0D127009BD5DD /* Common */,
3A1A174A26A48489006EE907 /* CodeTests */,
3A1A174C26A48489006EE907 /* InsetContentViewKeyboardTests */,
3A1A174826A48489006EE907 /* IntrinsicSizeTests */,
3A1A174F26A48489006EE907 /* KeyboardTests */,
3A1A175126A48489006EE907 /* ManagerTests */,
3A1A175326A48489006EE907 /* StoryboardTests */,
);
path = Tests;
sourceTree = "<group>";
@@ -407,7 +457,7 @@
3AAC049F21E2F28A00D94DA5 /* ScrollViewBounceControlling.swift */,
3AAC049621E2F01C00D94DA5 /* AdditionalSafeAreaInsetsController.swift */,
3AAC049D21E2F18E00D94DA5 /* AdditionalSafeAreaInsetsControlling.swift */,
3AAC049321E2F01C00D94DA5 /* UIResponder+Current.swift */,
3A1A174526A4839F006EE907 /* UIView+FirstResponder.swift */,
3A06577B2200A552005BE8CC /* IsUnitTest.swift */,
3A5702D121E2CBB600E4CC55 /* ScrollingContentViewController.h */,
);
@@ -424,6 +474,14 @@
path = ManagerExample;
sourceTree = "<group>";
};
3A89319129D0D127009BD5DD /* Common */ = {
isa = PBXGroup;
children = (
3A89319229D0D127009BD5DD /* ContentView.swift */,
);
path = Common;
sourceTree = "<group>";
};
3AAC04A521E39FBF00D94DA5 /* Examples */ = {
isa = PBXGroup;
children = (
@@ -723,7 +781,7 @@
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
3A3652F621F38E750010CE55 /* StoryboardTests.storyboard in Resources */,
3A1A176226A485C3006EE907 /* StoryboardTests.storyboard in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -781,6 +839,7 @@
/* Begin PBXShellScriptBuildPhase section */
3ACE0D7A220B2D790093FE5A /* Run SwiftLint */ = {
isa = PBXShellScriptBuildPhase;
alwaysOutOfDate = 1;
buildActionMask = 2147483647;
files = (
);
@@ -795,7 +854,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "if which swiftlint >/dev/null; then\nswiftlint\nelse\necho \"warning: SwiftLint not installed, download from https://github.com/realm/SwiftLint\"\nfi\n";
shellScript = "# If we don't do this, then SwiftLint won't be found on M1 macs,\n# because it's installed in /opt/homebrew/bin instead of /usr/local/bin\n# on that platform \nif test -d \"/opt/homebrew/bin/\"; then\n PATH=\"/opt/homebrew/bin/:${PATH}\"\nfi\nexport PATH\n\nif which swiftlint >/dev/null; then\nswiftlint\nelse\necho \"warning: SwiftLint not installed, download from https://github.com/realm/SwiftLint\"\nfi\n";
};
/* End PBXShellScriptBuildPhase section */
@@ -804,7 +863,6 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
3AAC049821E2F01C00D94DA5 /* UIResponder+Current.swift in Sources */,
3ADD380A21EBFC6200396B7A /* KeyboardFrameEvent.swift in Sources */,
3AF3AA3721FACCAF008AF677 /* ScrollViewFilter.swift in Sources */,
3AAC04A421E301C400D94DA5 /* ScrollViewFilterKeyboardDelegate.swift in Sources */,
@@ -813,6 +871,7 @@
3AAC049921E2F01C00D94DA5 /* KeyboardObserver.swift in Sources */,
3AF3AA3921FACCCC008AF677 /* ScrollViewFilterScrollDelegate.swift in Sources */,
3AAC049B21E2F01C00D94DA5 /* AdditionalSafeAreaInsetsController.swift in Sources */,
3A1A174626A4839F006EE907 /* UIView+FirstResponder.swift in Sources */,
3AAC04A021E2F28A00D94DA5 /* ScrollViewBounceControlling.swift in Sources */,
3AAC049E21E2F18E00D94DA5 /* AdditionalSafeAreaInsetsControlling.swift in Sources */,
3AD597D521F4221B00F220A0 /* KeyboardNotificationObserving.swift in Sources */,
@@ -829,14 +888,14 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
3A3652F821F390110010CE55 /* ContentView.swift in Sources */,
3A5702DD21E2CBB600E4CC55 /* StoryboardTests.swift in Sources */,
3AD597CF21F3AD8000F220A0 /* IntrinsicSizeTests.swift in Sources */,
3A881DB9224525F500E21CA2 /* InsetContentViewKeyboardTests.swift in Sources */,
3AD597D121F3B70400F220A0 /* KeyboardTests.swift in Sources */,
3AD597C921F3964000F220A0 /* CodeTests.swift in Sources */,
3AD597CD21F3AC2000F220A0 /* IntrinsicSizeContentView.swift in Sources */,
3AD597CB21F3995A00F220A0 /* ManagerTests.swift in Sources */,
3A1A176726A485C3006EE907 /* ManagerTests.swift in Sources */,
3A1A176526A485C3006EE907 /* StoryboardTests.swift in Sources */,
3A1A176826A485C3006EE907 /* InsetContentViewKeyboardTests.swift in Sources */,
3A1A176626A485C3006EE907 /* KeyboardTests.swift in Sources */,
3A89319329D0D127009BD5DD /* ContentView.swift in Sources */,
3A1A176426A485C3006EE907 /* IntrinsicSizeContentView.swift in Sources */,
3A1A176026A485BB006EE907 /* CodeTests.swift in Sources */,
3A1A176326A485C3006EE907 /* IntrinsicSizeTests.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -1121,14 +1180,13 @@
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = "";
INFOPLIST_FILE = "$(SRCROOT)/Sources/Info.plist";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
MARKETING_VERSION = 1.6.1;
PRODUCT_BUNDLE_IDENTIFIER = com.retroactivefiasco.ScrollingContentViewController;
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
SKIP_INSTALL = YES;
@@ -1149,14 +1207,13 @@
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = "";
INFOPLIST_FILE = "$(SRCROOT)/Sources/Info.plist";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
MARKETING_VERSION = 1.6.1;
PRODUCT_BUNDLE_IDENTIFIER = com.retroactivefiasco.ScrollingContentViewController;
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
SKIP_INSTALL = YES;
@@ -0,0 +1,78 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1250"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "3AE989822206443B006254A4"
BuildableName = "ReassignExample.app"
BlueprintName = "ReassignExample"
ReferencedContainer = "container:ScrollingContentViewController.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "3AE989822206443B006254A4"
BuildableName = "ReassignExample.app"
BlueprintName = "ReassignExample"
ReferencedContainer = "container:ScrollingContentViewController.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "3AE989822206443B006254A4"
BuildableName = "ReassignExample.app"
BlueprintName = "ReassignExample"
ReferencedContainer = "container:ScrollingContentViewController.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
@@ -0,0 +1,52 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1250"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "3A5702D621E2CBB600E4CC55"
BuildableName = "ScrollingContentViewControllerTests.xctest"
BlueprintName = "ScrollingContentViewControllerTests"
ReferencedContainer = "container:ScrollingContentViewController.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
+22
View File
@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.7.0</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
</dict>
</plist>
@@ -20,10 +20,10 @@ internal class KeyboardObserver: NSObject {
// See https://developer.apple.com/library/archive/documentation/StringsTextFonts/Conceptual/TextAndWebiPhoneOS/KeyboardManagement/KeyboardManagement.html#//apple_ref/doc/uid/TP40009542-CH5-SW3
private weak var delegate: KeyboardObserving?
private weak var scrollViewFilter: ScrollViewFilter?
private weak var delegate: KeyboardObserving?
/// The duration of the animation of the change to the container view's bottom inset.
private let bottomInsetAnimationDuration: TimeInterval = 0.5
@@ -95,9 +95,17 @@ internal class KeyboardObserver: NSObject {
// handled. This avoids unwanted animation.
scrollViewFilter.submitKeyboardFrameEvent(keyboardFrameEvent)
let keyboardDismissModeIsDefined: Bool
#if !os(visionOS)
keyboardDismissModeIsDefined = scrollView.keyboardDismissMode != .none
#else
// keyboardDismissMode is unavailable on visionOS.
keyboardDismissModeIsDefined = false
#endif
if notification.name == UIResponder.keyboardWillHideNotification
&& delegate?.shouldResizeContentViewForKeyboard == true
&& scrollView.keyboardDismissMode != .none
&& keyboardDismissModeIsDefined
&& scrollView.isTracking {
// If the keyboard is being dismissed by way of a drag gesture and the content view
// is resizable, respond to the change in the keyboard's frame immediately, without
@@ -183,7 +191,8 @@ internal class KeyboardObserver: NSObject {
guard let userInfo = notification.userInfo,
let keyboardFrameEndUserInfoValue = userInfo[UIResponder.keyboardFrameEndUserInfoKey] as? NSValue,
let keyboardAnimationDurationNumber = userInfo[UIResponder.keyboardAnimationDurationUserInfoKey] as? NSNumber,
let window = UIApplication.shared.keyWindow
let hostViewController = delegate?.hostViewController,
let window = hostViewController.view.window
else {
return nil
}
@@ -276,9 +285,7 @@ extension KeyboardObserver: ScrollViewFilterKeyboardDelegate {
guard let keyboardFrame = keyboardFrame,
let hostViewController = delegate?.hostViewController,
let rootView = hostViewController.view,
// UIApplication.shared.keyWindow is nil when unit tests are executing, and
// rootView is nil outside of unit tests in the case when a view is being pushed.
let window = isUnitTest ? rootView.window : UIApplication.shared.keyWindow else {
let window = rootView.window else {
return nil
}
@@ -26,11 +26,18 @@ internal class ScrollViewBounceController {
var bottomInset: CGFloat = 0 {
didSet {
guard let scrollView = delegate?.scrollView,
scrollView.keyboardDismissMode != .none else {
guard let scrollView = delegate?.scrollView else {
return
}
#if !os(visionOS)
guard scrollView.keyboardDismissMode != .none else {
return
}
#else
// keyboardDismissMode is unavailable on visionOS.
#endif
if bottomInset != 0 && oldValue == 0 {
// The keyboard was presented.
initialAlwaysBounceVertical = scrollView.alwaysBounceVertical
@@ -111,7 +111,7 @@ public class ScrollingContentScrollView: UIScrollView {
/// - view: The view to make visible.
/// - animated: If `true`, the scrolling is animated.
/// - margin: An optional margin to apply to the view. If left unspecified,
/// `scrollToVisibleMargin` is used.
/// `visibilityScrollMargin` is used.
public func scrollViewToVisible(_ view: UIView, animated: Bool, margin: CGFloat? = nil) {
scrollViewFilter?.submitScrollRectEvent(ScrollRectEvent(contentArea: .descendantViewRect(view.bounds, descendantView: view), animated: animated, margin: margin ?? visibilityScrollMargin))
@@ -124,9 +124,9 @@ public class ScrollingContentScrollView: UIScrollView {
/// - Parameters:
/// - animated: If `true`, the scrolling is animated.
/// - margin: An optional margin to apply to the first responder. If left
/// unspecified, `scrollToVisibleMargin` is used.
/// unspecified, `visibilityScrollMargin` is used.
public func scrollFirstResponderToVisible(animated: Bool, margin: CGFloat? = nil) {
guard let view = UIResponder.rf_current as? UIView else {
guard let view = self.firstResponder as? UIView else {
return
}
@@ -58,12 +58,12 @@ open class ScrollingContentViewController: UIViewController {
///
/// The default value is `false`.
@IBInspectable public var shouldResizeContentViewForKeyboard: Bool {
set {
scrollingContentViewManager.shouldResizeContentViewForKeyboard = newValue
}
get {
return scrollingContentViewManager.shouldResizeContentViewForKeyboard
}
set {
scrollingContentViewManager.shouldResizeContentViewForKeyboard = newValue
}
}
/// If `true`, the view controller's `additionalSafeAreaInsets` property is adjusted
@@ -71,12 +71,12 @@ open class ScrollingContentViewController: UIViewController {
///
/// The default value is `true`.
@IBInspectable public var shouldAdjustAdditionalSafeAreaInsetsForKeyboard: Bool {
set {
scrollingContentViewManager.shouldAdjustAdditionalSafeAreaInsetsForKeyboard = newValue
}
get {
return scrollingContentViewManager.shouldAdjustAdditionalSafeAreaInsetsForKeyboard
}
set {
scrollingContentViewManager.shouldAdjustAdditionalSafeAreaInsetsForKeyboard = newValue
}
}
/// An object that manages adding a content view to a scroll view.
@@ -1,35 +0,0 @@
//
// UIResponder+Current.swift
// ScrollingContentViewController
//
// Created by Drew Olbrich on 12/29/18.
// Copyright 2019 Oath Inc.
//
// Licensed under the terms of the MIT License. See the file LICENSE for the full terms.
//
// Based on the Stack Overflow answer https://stackoverflow.com/a/52823735/2419404
// by MarqueIV https://stackoverflow.com/users/168179/marqueiv
// Licensed under the terms of the Attribution-ShareAlike 3.0 Unported license
// https://creativecommons.org/licenses/by-sa/3.0/
//
import UIKit
private var foundFirstResponder: UIResponder?
internal extension UIResponder {
/// The current first responder.
static var rf_current: UIResponder? {
UIApplication.shared.sendAction(#selector(UIResponder.storeFirstResponder(_:)), to: nil, from: nil, for: nil)
defer {
foundFirstResponder = nil
}
return foundFirstResponder
}
@objc private func storeFirstResponder(_ sender: AnyObject) {
foundFirstResponder = self
}
}
@@ -0,0 +1,31 @@
//
// UIView+FirstResponder.swift
// ScrollingContentViewController
//
// Created by Drew Olbrich on 12/29/18.
// Copyright 2019 Oath Inc.
//
// Licensed under the terms of the MIT License. See the file LICENSE for the full terms.
//
import UIKit
internal extension UIView {
/// The first responder within a view hierarchy.
var firstResponder: UIResponder? {
let responder = self as UIResponder
if responder.isFirstResponder {
return responder
}
for subview in subviews {
if let firstResponder = subview.firstResponder {
return firstResponder
}
}
return nil
}
}
@@ -10,15 +10,15 @@
import UIKit
/// A view assigned `contentView` property in StoryboardTests.storyboard.
class ContentView: UIView {
/// A content view used by `StoryboardTests`, `CodeTests`, and `ManagerTests`.
public class ContentView: UIView {
/// A constraint that determines the view's width.
var widthConstraint: NSLayoutConstraint!
public var widthConstraint: NSLayoutConstraint!
/// A constraint that determine the view's height. This constraint's constant is
/// manipulated externally to test the behavior of views of varying heights.
var heightConstraint: NSLayoutConstraint!
public var heightConstraint: NSLayoutConstraint!
override init(frame: CGRect) {
super.init(frame: frame)